Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
The DatePicker has a Date property, but its value is always low by 1 day.
When you select e.g. 2012-01-01 it has value 2011-12-31.
The value displayed on the picker is correct, but the Date Property is wrong.
This can easily be demonstrated with this little project.
Whenever the DatePicker is changed, the current Date value is written to the console.
The little demo at https://github.com/guivho/DatePickerTest only demonstrates the problem for UIDatePickerMode.Date cases.
But the two other modes can also be tested by fiddling with the comments on the mode lines.
UIDatePickerMode.DateAndTime and UIDatePickerMode.Time pickers have the hour field low by one hour.
I detected this problem with the latest 5.2.x MT, but it may well be inherited from previous versions.
As Jackson Harper pointed out in the monotouch mailing list, this Date property is in UTC.
My local time is UTC+1, so the reported date is midnight - 1 hour, ergo the previous day.
Sorry for the noise.