ASP.NET CalendarDay IsSelectable 属性
定义和用法
IsSelectable 属性用于获取或设置日期是否为可选。
如果日期可选,则该属性返回 "TRUE",否则返回 "FALSE"。
下面的实例显示了周末不可选的日历:
<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>
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>
演示实例 »
版权声明:本页面内容旨在传播知识,为用户自行发布,若有侵权等问题请及时与本网联系,我们将第一时间处理。E-mail:284563525@qq.com