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

Null DateTime validation

2 Answers 29 Views
DateTimePicker
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 10 Nov 2011, 10:21 PM
The standard Silverlight date/time editors throw a validation "Input is not in the correct format." when changed to null (blanked out). The RadDateTimePicker uses a nullable SelectedValue and that validation message is never displayed. The property is a stright up DateTime and has a RequiredValueVerifier (DevForce) but nothing is ever shown in the UI that the field needs something done to become valid. The RequiredValueVerifier is never actually used in the standard Silverlight controls because I believe it hits a cast or parse exception first.

How do I show in the UI that the field is required?

Thanks,
Steve

2 Answers, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 11 Nov 2011, 12:19 PM
Hi Steve,

You can find attached an example demonstrating how to validate RadDateTimePicker.

All the best,
Ivo
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Steve
Top achievements
Rank 1
answered on 11 Nov 2011, 01:21 PM
Thanks Ivo,

The one that made it work was ValidatesOnExceptions=True, which you didn't have in the sample.

Thanks,
Steve
Tags
DateTimePicker
Asked by
Steve
Top achievements
Rank 1
Answers by
Ivo
Telerik team
Steve
Top achievements
Rank 1
Share this question
or