Easyui datebox time limit, datebox Start Time Limit End Time, datebox end date greater than the start date implementation code, easyuidatebox
I. Html code
Note that data-options = "editable: false" must be added, and the date cannot be modified directly.
<Tr> <td width = "15%" class = "label"> contract start date: </td> <td width = "35%"> <input value = "$ {loan. contractBegtime} "class =" f1 easyui-datebox "id =" contractBegtime "name =" contractBegtime "data-options =" required: true, editable: false "/> <font class =" star-red "> * </font> </td> <td width =" 15% "class =" label "> contract deadline: </td> <td width = "35%"> <input value = "$ {loan. contractEndtime} "class =" f1 easyui-datebox "id =" contractEndtime "name =" contractEndtime "data-options =" required: true, editable: false "/> <font class =" star-red "> * </font> </td> </tr>
Ii. js Code restrictions
$("#contractBegtime").datebox({ onSelect : function(beginDate){ $('#contractEndtime').datebox().datebox('calendar').calendar({ validator: function(date){ return beginDate<date;//<= } }); } });
After the limit is added, after the start date is selected, the end date must be greater than the start date. If you want to set the end date, it can be equal to the start date,
Use <=.
Reminder:data-options="editable:false"
Otherwise, the end date can be modified to a time earlier than the start date.
If you have other requirements, you can view the official documentation:
Http://www.jeasyui.net/demo/345.html
The preceding section describes the easyui datebox time limit. The datebox start time limits the end time. The datebox end date is later than the start date. I hope it will be helpful to you, if you have any questions, please leave a message and the editor will reply to you in time. Thank you very much for your support for the help House website!