msbyuva
msbyuva

Reputation: 3625

Validation for calender control of RadDatePicker (Telerik Controls)

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.

Upvotes: 1

Views: 3813

Answers (2)

mmcfly
mmcfly

Reputation: 878

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);

Upvotes: 0

Anyname Donotcare
Anyname Donotcare

Reputation: 11423

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.

Upvotes: 2

Related Questions