
I'm using RadDatePicker.
By default on validation error (if wrong entry is made) it displays error "Can't convert null to type System.DateTime" and the box shows "Input is not in correct format".
Is there a way I can modify these messages.
Any help will be appreciated.
Thanks,
Paresh
11 Answers, 1 is accepted
The easiest way to achieve this is to create a MVVM model which is bound to the RadDatePicker. In case of wrong typed date you can catch in your view model class and throw the message you desire. Let us know if you need any further information or examples.
Kind regards,
Kaloyan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

Any sample example code will be of great help.
Thanks,
Paresh
Greetings,
Kaloyan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

Hi,
The demo in site doesn't implement custom validation. Please find the screen shot attached.
Any implementation with custom error string as output will be of great help.
Thanks,
Paresh
Kind regards,
Kaloyan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

I have the same issue when using RadDatePicker , when I enter nothing into RadDatePicker (clear content of RadDatePicker ) , an error message "Input is not in correct format" will be displayed . The RadDatePicker is bound to the field "FromDate ", in metadata
Public FromDate As DateTime |
And in database the type of this field is date , not allow null .
Is there any way to turn off the message or how can I localize the error message ?
It's great if we can localize the message.
Thanks in advance
See the attached application. It may help you to find a way to change the massage to the desire one. In case you want to remove it you have to modify the template of the control. Just remove the Validation tooltip control.
Greetings,
Kaloyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

Hi,
I have problem like Nguyen Xuan Truong 's problem when I use RadDatePicker approaching MVVM pattern and WCF RIAServices.
I tried to bug by using converter or bug in generate code or bug in line of code firing event BindingValidationError ... but I have not known when a RadDatePicker control throw exception with ErrorContent ="Input is not in correct format" . I think that "throw exception" occurs before firing event BindingValidationError.
You can post a sample example resolve it.
Thanks!
Pham Hong Van
The RadDatePicker is parsing its value after loosing its focus. In case of an invalid input(when null) the validation is throwing an exception. When using a MVVM pattern you can specify the validation tooltip content that will be displayed to the user. What is the scenario you want to be achieved?
Best wishes,
Kaloyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

Can you provide exampled for this solution you mentioned above.
Thanks
What I can suggest you would be to check the following example from our online Silverlight demos:
http://demos.telerik.com/silverlight/#DateTimePicker/Validation
In the ValidationViewModel class you can see how the different error messages are returned.
Hope this helps.
Regards,
Kalin
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.