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

RadDatePicker and RadTimePicker Validation

1 Answer 114 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 08 Mar 2011, 05:15 PM
I have a requirement to validate some of the RadDatePicker and RadTimePicker fields on our form.

If invalid characters are typed into these fields, although a yellow triangle is displayed on the control, the user can still submit the form.

The examples I've seen to remedy this involved using a RequiredFieldValidator.

However, in our case, not all date or time fields will have to be completed - some may be left blank.

Is there a solution for this, preferably using both client side and server side validation?

Matt.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 10 Mar 2011, 11:27 AM
Hello Matt,


In your case, I believe using "CustomValidator" would be better option. In the "ClientValidationFunction" handler, check for whether any of the DatePicekr has valid dates (based on your requirement) and set page as valid/invalid.

The following documentations will help you on client side methods of RadDatePicker.
Client-Side Basics
RadDatePicker Client Object


-Shinu.
Tags
Calendar
Asked by
Matt
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or