ASP.NET IsSelectable Property

Definition and Usage

The IsSelectable property is used to get or set whether the date is selectable.

If the date is selectable, it returns "TRUE", otherwise it is false.

Example

The following example shows a calendar where weekends are not selectable:

<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">
  Weekends are not selectable
  <asp:Calendar id="cal1" runat="server"
  OnDayRender="DaySelect" />
</form>

Example

Use IsSelectable to set which days in the calendar are selectable