使用AJAX日历控件,显示某些日期(CalendarExtender)
1. The HTML Markup
<div> <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1" Format="yyyy/MM/dd"></ajaxToolkit:CalendarExtender> </div>
2. The Page_Load event
//disable the past date CalendarExtender1.StartDate = DateTime.Now; //disable the futhre date CalendarExtender1.EndDate = DateTime.Now; //Start Calendar after one month from the Present Date CalendarExtender1.StartDate = DateTime.Now.AddMonths(1);
More information please refer to the link below.
http://jsbin.com/rolifo/4/edit?html,output
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。