ASP.NET CalendarDay IsSelectableProperty


CalendarDay 控件CalendarDay Control

Definition and Usage

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

If the date is selectable, the property returns "TRUE"; otherwise, it returns "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">
  The weekends are not selectable
  <asp:Calendar id="cal1" runat="server"
  OnDayRender="DaySelect" />
</form>

Demo Example »

CalendarDay 控件CalendarDay Control Other Extensions