首页 > 代码库 > 使用AJAX日历控件,显示某些日期(CalendarExtender)
使用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
http://www.c-sharpcorner.com/UploadFile/0c1bb2/disable-future-and-past-date-of-ajax-calendar-in-Asp-Net-C-Sharp/
使用AJAX日历控件,显示某些日期(CalendarExtender)
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。