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

Setting mindate programatically

2 Answers 76 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
alh
Top achievements
Rank 1
alh asked on 16 Jan 2009, 12:30 PM
Is there a way to set the mindate programatically, preferrably at serverside

I tried ReplaceDatePicker.MinDate.AddDays(7) but the date is simply not changed

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Jan 2009, 12:57 PM
Hi Alh,

I suppose you have already set the MinDate property for the datepicker and want to add 7 days to that date and reset the MinDate. If that is the case, try out the following code snippet:

CS:
protected void Button1_Click(object sender, EventArgs e) 
    DateTime dt = new DateTime(); 
    dt = RadDatePicker1.MinDate; 
    dt = dt.AddDays(7); 
    RadDatePicker1.MinDate = dt; 

Thanks,
Princy.
0
alh
Top achievements
Rank 1
answered on 16 Jan 2009, 01:32 PM
Thank you. That did the trick
Tags
Calendar
Asked by
alh
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
alh
Top achievements
Rank 1
Share this question
or