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

Disabling dates in code behind

2 Answers 94 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Rod
Top achievements
Rank 1
Rod asked on 09 Jan 2009, 06:54 PM
Hi -

I've seen where you can disable certain dates in the ASPX page by using the SpecialDays tag and setting IsSelectable to false, but how do I do that in the code behind?  We'd like to be able to identify dates for booking a visit based on available dates from the database, so for any given month there may be one or two dozen days that we need to black out.

Thanks,

Rod

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 12 Jan 2009, 04:36 AM
Hi,

Try the following code snippets,

CS:
RadCalendarDay spec = new RadCalendarDay(); 
DateTime dateV = new DateTime(2009, 01, 10); 
spec.Date = dateV; 
spec.IsSelectable = false
spec.IsDisabled = true
RadCalendar1.SpecialDays.Add(spec); 

Thanks,
Shinu.
0
Rod
Top achievements
Rank 1
answered on 21 Jan 2009, 03:31 AM
Works fine - thanks.

Rod

Tags
Calendar
Asked by
Rod
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Rod
Top achievements
Rank 1
Share this question
or