After comparison with the official demo case, the problem is finally found.
The error method I used:
The code is as follows: |
Copy code |
<Input type = "text" id = "to" name = "to_date" class = "xxshort form-text hasDatepicker"/> |
Correct usage:
The code is as follows: |
Copy code |
<Input type = "text" id = "to" name = "to_date" class = "xxshort form-text"/> |
HasDatepicker is the class generated when the date is selected in the jQuery UI Datepicker pop-up window after clicking the text box.
Therefore, this class must not be added to the class in the text box in advance.
Check whether the jQuery UI Datepicker is initialized and loaded to the page. You only need to use the debugging tool to check whether the div layer of Datepicker is mounted to the body.
For example:
The code is as follows: |
Copy code |
<Div id = "datepicker_div"> </div> Or www.111cn.net <Div class = "ui-datepicker ui-widget-content ui-helper-clearfix ui-corner-all" id = "ui-datepicker-div"> </div> </blockquote> |
If the above div generates HTML and you cannot see the pop-up box, it means that the css of the date is not loaded.