jquery itself provides the functionality of the calendar operation, but has been working with the My97datepicker calendar, each use of the Import folder and the library provided, looked bored, the two days pondering the
JQ of the Calendar control operation, compared to the previous use, the code is more than write a point, but after all, is JQ itself, will not appear some unexpected problems, the following is the code display, I belong to rookie class, write bad, to you heroes more pointing criticism
This is the start date operation
$ ("#endTime"). DatePicker ({
Here write the custom parameter operations such as Showothermonths:true, Selectothermonths:true,
Onselect:function (Datetext, inst) {
$ ("#begTime"). DatePicker ("option", "MaxDate", New Date (Datetext.replace ("-", ",")));//This is the default date, as in 12/2/2011
$ ("#begTime"). DatePicker ("option", "MaxDate", New Date (Datetext.replace ("-", "-")));//Here is the date format changed, 2011-12-2
}
});
This is the end date action
$ ("#begTime"). DatePicker ({
Onselect:function (Datetext, inst) {
$ ("#endTime"). DatePicker ("option", "MinDate", New Date (Datetext.replace ("-", "-"));
}
});
Click the OK button to appear in the modal dialog box, select Start Date and end date
<input id= "Button1" type= "button" value= "OK"/>
<div id= "putdate" title= "Enter Date" >
<span> Please enter a start date:</span>
<input type= "text" id= "Begtime" class= "ui-widget-content ui-corner-all"/>
<span> Please enter the end date:</span>
<input type= "text" id= "EndTime" class= "ui-widget-content ui-corner-all"/>
</div>
The above is the implementation of the functional part of the code, the function is completed, but there is not satisfactory, looking for a half-day, did not find the pop-up Calendar box Empty button, in short, the operation is not as convenient as before