This is a migrated thread and some comments may be shown as answers.

Setting bound nullable date not working after Q2 release

2 Answers 63 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Paul Ridden
Top achievements
Rank 1
Veteran
Paul Ridden asked on 16 Jul 2010, 05:11 PM
Hi

I have a Date Picker that is bound to an object with a Nullable<DateTime> property.

Prior to Q2 when I entered a value in the picker, then clicked a 'Clear' button that set the DataContext to a new instance of my object (which has a null DateTime by default), the date would be cleared.

After the Q2 release the date remains and is not cleared properly.

Thanks
Russell Mason

2 Answers, 1 is accepted

Sort by
0
Accepted
Tyree
Top achievements
Rank 2
answered on 16 Jul 2010, 07:35 PM
Are you using SelectedDate or SelectedValue? When using SelectedDate I had the same problem but if you use SelectedValue it is Nullable and worked fine for me
0
Paul Ridden
Top achievements
Rank 1
Veteran
answered on 19 Jul 2010, 10:27 AM
Excellent, that worked. Thanks for the tip.

Russell Mason
Tags
DatePicker
Asked by
Paul Ridden
Top achievements
Rank 1
Veteran
Answers by
Tyree
Top achievements
Rank 2
Paul Ridden
Top achievements
Rank 1
Veteran
Share this question
or