Latest web development tutorials

ASP.NET CalendarDay IsSelectable property

CalendarDay control CalendarDay control

Definition and Usage

IsSelectable property is used to get or set the date is optional.

If the date is optional, this property returns "TRUE", otherwise "FALSE".


Examples

The following example shows the weekends optional calendar:

<script runat="server">
Sub DaySelect(obj As Object, e As DayRenderEventArgs)
If e.Day.IsWeekend Then
e.Day.IsSelectable = False
End If
End Sub
</script>

<form runat="server">
<form runat="server">
The weekends are not selectable
<asp:Calendar id="cal1" runat="server"
OnDayRender="DaySelect" />
</form>

The demonstration >>

CalendarDay control CalendarDay control