How to make a specific date lock in calender control

Posted by Shwetabansal888 under ASP.NET on 7/15/2010 | Views : 1887 | Status : [Member] | Replies : 1
Hi all,
Can anybody plz help me out about How to make a specific date lock in calender control in asp.net,C#.
Its very urgent.Plz reply soon.
Shweta




Responses

Posted by: Neeks on: 7/15/2010 [Member] Bronze

Up
0
Down
I think this post is already posted
So, please don't post the same post with different subjects.

protected void Calendar1_DayRender(object sender, System.Web.UI.WebControls.DayRenderEventArgs e)
{
// Select all dates in the past
if (e.Day.Date < System.DateTime.Today)
{
// Disable date
e.Day.IsSelectable = false;
// Change color of disabled date
e.Cell.ForeColor = Color.Gray;
}

}


Thanks,

Shwetabansal888, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response