Sunday, 29 December 2013

ASP.Net - How to disable days in Calendar, change color of disabled days, strike out

Watch this example on YouTube



protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)

{
 
if (e.Day.Date < DateTime.Now.Date)

{
 
                 
   e.Day.IsSelectable = false;

   e.Cell.ForeColor = System.Drawing.Color.Red;

   e.Cell.Font.Strikeout = true;


}

}
 

No comments:

Post a Comment