How to disable particular Day of a Week in ASP.Net Calendar control?
By Super Man
how to disable to selct any day of a week in calendar control
The below little code snippet will help you to do that by using DayRender event of
Calendar control.
ASPX
<asp:Calendar ID="Calendar1"
runat="server" ondayrender="Calendar1_DayRender"> </asp:Calendar>
CodeBehind
protected
void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
if
(e.Day.Date.DayOfWeek == DayOfWeek.Monday)
{
e.Day.IsSelectable
= false;
}
}
How to disable particular Day of a Week in ASP.Net Calendar control? (788 Views)