XAML and Date Picker #8338
Description
This issue has been moved from a ticket on Developer Community.
Binding Date = 12Oct19 09:30.
If the XAML page contains a line such as follows:
<DatePicker x:Name="_datePicker" Format="ddMMMyy" Date="{Binding Date}" DateSelected="DatePicker_DateSelected"/>
follwed by the line such as:
<Label x:Name="_timeLabel" Text="{Binding Date, StringFormat='{0:HH:mm}'}"></Label>
the Label _timeLabel will contain the Text: "00:00" instead of the value in the Binding Date Time if _datePicker was not used.
This is because the _datePicker even though not used has updated the Binding Date to it's Default Time Value of "00:00".
Reversing the lines to read:
<Label x:Name="_timeLabel" Text="{Binding Date, StringFormat='{0:HH:mm}'}"></Label>
<DatePicker x:Name="_datePicker" Format="ddMMMyy" Date="{Binding Date}" DateSelected="DatePicker_DateSelected"/>
will now show "09:30" in the Label _timeLabel.
This is an important fault of Date Picker, and I think Time Picker may also have this problem where if not use they fill the Binding Field with their Default Values.
Original Comments
Visual Studio Feedback System on 10/21/2019, 04:53 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)