Question

I want to validate the RadDatePicker when a date is selected. User should not select greater than a particular date ? How can I restrict user from selecting a date which is not greater than a particular date.

Particular date populated from the database.

Was it helpful?

Solution

You can use CompareValidator Control.Just note to compare to your date (ValueToCompare) instead of (ControlToCompare) and set the type. By default it's string as i remember.so you need to set it to Date.Also look to this page.

OTHER TIPS

On your other question:

How can I restrict user from selecting a date which is not greater than a particular date.

In C#:

RadDatePicker1.MaxDate = myMaxDateTimeVariable;

or client-side:

var radDatePicker1 = $find("<%= RadDatePicker1.ClientID %>");
radDatePicker1.set_maxDate(myMaxDate);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top