From my previous experiences , what i have found out is that sometimes we need to disable the previous and coming dates in a calendar control. So finally i thought to post it out. It goes like this....,
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
if (e.Day.Date< DateTime.Today)
{
e.Day.IsSelectable = false;
e.Cell.ToolTip = "This date is not available";
}
else if (e.Day.Date> DateTime.Today)
{
e.Day.IsSelectable = false;
e.Cell.ToolTip = "This date is not available";
}
}
Keep rockiin........
8c3ab124-55a3-4dff-88c1-bc924faa4334|0|.0
Tags:
asp,
asp.net,
c#,
disable dates,
calendar
Categories:
ASP.NET