I need to be able to have a calendar which only allows the user to select a saturday if a 7 nights is chosen from a combo box on a form and to allow the user to just select a monday if an 4 nights is chosen from the combo box.
I am currently using the RadDatepicker and have set it up to add the disabled dates for the year to the special days. So if a 7 is selected the dt variable will be every day except a saturday.
I don't seem to be able to get this to work. I am also trying to reset the calendar whenever the combo box value changes. But can't get this to work either.
I am currently using the RadDatepicker and have set it up to add the disabled dates for the year to the special days. So if a 7 is selected the dt variable will be every day except a saturday.
RadCalendarDay holiday =
new
RadCalendarDay();
holiday.Date = dt;
holiday.IsSelectable =
false
;
holiday.IsDisabled =
true
;
CalendarPopup1.Calendar.SpecialDays.Add(holiday);
I don't seem to be able to get this to work. I am also trying to reset the calendar whenever the combo box value changes. But can't get this to work either.
public
void
ResetCalendar()
{
CalendarPopup1.Clear();
CalendarPopup1.Calendar.SpecialDays.Clear();
}