Home > DeveloperSection > Forums > Disable some dates in Calendar control
Rajesh Goswami

Total Post:29

Points:203
Posted on    August-24-2011 1:05 AM

 ASP.Net ASP.Net 
Ratings:


 1 Reply(s)
 1770  View(s)
Rate this:
I want to disable some dates in calendar control but can not find the suitable solution of its
please solve it
thanks in advance!


Amit Singh

Total Post:103

Points:721
Posted on    August-24-2011 6:31 AM

Hi rajesh

Check this line of code on DayRender event on calendar control

protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
    string date="08/24/2011";
    DateTime dt = DateTime.Parse(date);
    if (e.Day.Date == dt)
        e.Day.IsSelectable = false;
}


Don't want to miss updates? Please click the below button!

Follow MindStick