This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 44011 - Error in DatePicker.Date default value
Summary: Error in DatePicker.Date default value
Alias: None
Product: Forms
Classification: Xamarin
Component: Android (show other bugs)
Version: 2.3.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Stephane Delcroix
Depends on:
Reported: 2016-09-06 11:05 UTC by Arne De Vreese
Modified: 2017-05-30 12:35 UTC (History)
6 users (show)

See Also:
Tags: ac
Is this bug a regression?: ---
Last known good build:

Test project (196.68 KB, application/x-zip-compressed)
2016-09-06 11:05 UTC, Arne De Vreese

Description Arne De Vreese 2016-09-06 11:05:38 UTC
Created attachment 17338 [details]
Test project

## Description

When a DatePicker instance is instantiated the value of the Date property is automatically set to the date the application was launched, not to the current date.

When the systemdate changes (manually or because midnight passes) while the application is running, the Date property of new DatePicker instances will default to the original 'current date', not to the new one.

## Steps to reproduce

1. Launch the attached test project to an Android or iOS device or simulator. Two DatePickers and one Label will be displayed all showing the current (system) date.

2. Change the system date of the device

3. Click 'New' to open a new instance of the same View containing two new DatePicker instances and one new Label.

Expected result: both the two new DatePicker instances and the Label should show the new system date.

Actual result: the 2nd DatePicker, for which the Date was explicitly set to the current system date, shows the correct date, but the 1st DatePicker for which no value was set, defaults to the original date (launch date of the app).
Comment 2 adrianknight89 2016-10-19 14:02:21 UTC
This is already in master now:
Comment 3 Parmendra Kumar 2016-11-21 16:29:06 UTC
I have checked this issue with latest forms version and still getting same issue on both android and iOS.


Hence reopen this issue.
Comment 4 adrianknight89 2016-11-21 16:38:13 UTC
I'm not sure if it was released yet. Maybe it will appear in the next pre1.
Comment 5 Parmendra Kumar 2016-11-25 05:59:27 UTC
@Adrianknight, I have checked this issue with latest pre version 2.3.4-pre1 and still getting same issue as mentioned in comment #3.

Comment 6 Samantha Houts 2017-03-22 21:37:03 UTC
I confirm that was not a fix for this issue.
Comment 7 Stephane Delcroix 2017-05-30 12:35:11 UTC

Note You need to log in before you can comment on or make changes to this bug.