Hi,
I want to disable weekend date using ajax calendar control.
Below js code is working but its not disabled in calendar. How to do this using c#?
function detect_sunday(sender, args) {
if (sender._selectedDate.getDay() == 0) {
sender._selectedDate = new Date();
// set the date back to the current date
sender._textbox.set_Value(sender._selectedDate.format(sender._format));
//alert("You can't select sunday!");
}
}
Pls help
Upendra Pratap ShahiPosted Jul 10, 2015, 6:41 AM
protected override void OnDayRender(TableCell cell, CalendarDay day)
{
}
Manoj BhoirPosted Jul 10, 2015, 6:22 AM
/// Render the day on the calendar with the information provided.
///
/// The cell in the table.
/// The calendar day information
protected override void OnDayRender(TableCell cell, CalendarDay day)
{
// If this is a weekend day and they should be hidden, remove
// them from the output
if (day.IsWeekend)
{
cell.Enable= false;
}
// Call the base render method too
base.OnDayRender(cell, day);
}