I am binding a Date field to RadDatePicker
. When there is a null value for the Date field, the RadDatePicker
displays 01/01/0001, but I want it to remain blank.
Asked
Active
Viewed 4,376 times
0

Grant Winney
- 65,241
- 13
- 115
- 165

user2424618
- 13
- 1
- 2
-
Wow even the answer seems to be duplicated as with the question :) – V4Vendetta May 27 '13 at 11:49
2 Answers
2
If you are bind not nullable datetime variable i.e (DateTime) to control then it will use default 01/01/001 date instead of Empty.... So if you want the default value as a Empty then just change the datatype of your variable which is bound to control to (DateTime?).....
DateTime ===> DateTime?
It works fine...

Chetan S
- 935
- 1
- 11
- 21
0
You will have to set the SelectedDate
to null.
It is as follows:
Rdtp.SelectedDate = null;
In xaml you will have to set DateTimeWatermarkContent
to empty as follows
DateTimeWatermarkContent=""
in
<telerik:RadDatePicker x:Name="Rdtp" DateTimeWatermarkContent="" />
Hope Its Helpful.

Freelancer
- 9,008
- 7
- 42
- 81