Source Code to add a popup Date Picker control using JavaScript in ASP.NET
I need the proper steps/Source Code to add a POPUP Date Picer control using JavaScript in ASP.N开发者_Python百科ET
Use JQuery Datepicker.
The jQuery UI Datepicker is a highly configurable plugin that adds datepicker functionality to your pages. You can customize the date format and language, restrict the selectable date ranges and add in buttons and other navigation options easily.
By default, the datepicker calendar opens in a small overlay onFocus and closes automatically onBlur or when a date is selected. For an inline calendar, simply attach the datepicker to a div or span.
You can use keyboard shortcuts to drive the datepicker.
I would suggest using one of these:
- Calendar Extender control in AJAX Control Toolkit
- jQuery DatePicker
An example for the CalendarExtender
control in the AJAX Control Toolkit:
<asp:TextBox ID="TxtDate" Enabled="false" runat="server" AutoPostBack="false"
CausesValidation="true" ValidationGroup="VG_SAVE"></asp:TextBox>
<asp:CalendarExtender ID="DateExtender" runat="server"
TargetControlID="TxtDate" />
精彩评论