Bug 58071 - TimePicker time changed AFTER unfocus event
Summary: TimePicker time changed AFTER unfocus event
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
Depends on:
Reported: 2017-07-11 08:50 UTC by Saskia
Modified: 2018-05-11 21:09 UTC (History)
4 users (show)

Tags: ac android timepicker unfocused propertychanged
Is this bug a regression?: ---
Last known good build:

Test app (58.02 KB, application/x-zip-compressed)
2017-07-11 08:50 UTC, Saskia

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Saskia 2017-07-11 08:50:58 UTC
Created attachment 23470 [details]
Test app

I want to do some actions that need the selected time when the TimePicker is unfocused. However at that time the TimePicker.Time property holds the value as it was when the TimePicker got focus.

I also want to do these actions when the time has not changed and I don't want to do these actions twice.

So adding a propertychanged event for the time property is no solution. 
I don't know whether the time is changed when the unfocused event is called, so I can't check that.
And the propertychanged event is only called when the time is changed, so nothing happens when the time is not changed.

The datepicker DOES have the changed date when the unfocused event is called. I can think of no reason why the timepicker should handle this differently.

See attached test project.
Comment 1 Jimmy [MSFT] 2017-07-11 15:23:19 UTC
I am able to reproduce this issue with the attached project. The TimePicker fires off its Unfocused event _before_ the Time property has been updated. This is in contrast to the DatePicker which updates the Date property then fires Unfocused. The two controls should behave consistently.

### Version Tests
Comment 2 Jimmy [MSFT] 2017-07-11 16:00:50 UTC
Comment 3 Rui Marinho 2017-08-17 16:16:54 UTC
Should be fixed on 2.4.1-pre1
Comment 4 Andre Souza 2018-05-11 21:09:41 UTC
In Xamarion.Forms it is still happening.