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

RadDatePicker + Restrictions

2 Answers 90 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
James Legan
Top achievements
Rank 1
James Legan asked on 04 Nov 2008, 02:47 PM
I have a signout system in my app that, based on some criteria allows a user to sign something out for 1 - n days. I was formally using a custom control that was developed by a 3rd party that I could disable days beyond the users allowed limits (ie If the user was only allowed to sign something out for 14 days max, the 15th day and beyond would be unselectable). This control however had some serious issues and now that I am the proud owner of RadControls, I would like to use Telerik's implementation.

My question is two fold:

1) Is this possible with the RadDatePicker / RadCalender?
2) If not, what is the best solution to implement to obtain the desired result.

Thanks,

Jim

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 05 Nov 2008, 07:54 AM
Hi James,

The RadDatePicker has MinDate and MaxDate properties that allows to select a date range for the Datepicker. You can achieve the desired functionality by setting these properties to the desired dates. The code snippet for this is given below.

    protected void Page_Load(object sender, EventArgs e) 
    { 
        RadDatePicker1.MinDate = Convert.ToDateTime("11/5/2008 12:00:00 AM"); 
        RadDatePicker1.MaxDate = Convert.ToDateTime("11/19/2008 12:00:00 AM"); 
    } 

Thanks,
Shinu.
0
James Legan
Top achievements
Rank 1
answered on 05 Nov 2008, 08:23 PM
Thanks Shinu!

You do *not* want to see the code I came up with yesterday to accomplish the same result :).
Tags
Calendar
Asked by
James Legan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
James Legan
Top achievements
Rank 1
Share this question
or