While using the ASP.NET Calendar Control, a common requirement is to prevent the users from selecting any dates that fall on a weekend (Saturday & Sunday). Here’s how to do so by using the DayRender event of the ASP.NET Calendar control.
<asp:Calendar ID="wkDayCalendar" runat="server"
protected void wkDayCalendar_DayRender(object sender,
e.Day.IsSelectable = !e.Day.IsWeekend;
Protected Sub wkDayCalendar_DayRender(ByVal sender As Object,
ByVal e As DayRenderEventArgs)
e.Day.IsSelectable = Not e.Day.IsWeekend
As you can see, the user cannot select any dates from the weekend as it is not selectable any more.
Will you give this article a +1 ? Thanks in advance