locked
XAML DatePicker control - nullable (default) date ? RRS feed

  • Question

  • Same question as the one archived here:

    http://social.msdn.microsoft.com/Forums/expression/en-US/de7f74e7-eea0-4e4b-87ee-659b716abd75/datepicker-nullable-date

    I'm familiar with using value converters to present a bound parameter value nicely in the UI but can't see how one could be used with the XAML DatePicker control to prevent it showing a date by default.

    Monday, October 28, 2013 4:56 PM

Answers

  • You can use a value converter to map a nullable on the back-end to a default date in the UI. The DatePicker will always show a date, defaulting to Now if the Date property isn't set.

    --Rob

    • Marked as answer by Anne Jing Tuesday, November 5, 2013 9:24 AM
    Tuesday, October 29, 2013 1:11 AM
    Moderator