Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

XAML and Date Picker #8338

Open
Open
@vsfeedback

Description

@vsfeedback

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Corea/datepickere/4 🕓4i/highCompletely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions