Easyui datebox time limit, datebox Start Time Limit End Time, datebox end date is greater than the start date, easyuidatebox
Easyui datebox time limit, datebox Start Time Limit End Time, datebox end date is greater than the start date
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ..
Copyright, sweet potato Yao, January 12, 2017 10:18:53, Thursday
Http://www.cnblogs.com/fanshuyao/
I. Html code
Note that data-options = "editable: false" must be added, and the date cannot be modified directly.
Java code
- <Tr>
- <Td width = "15%" class = "label"> contract start date: </td>
- & Lt; td width = "35%" & gt;
- <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>
- & Lt; td width = "35%" & gt;
- <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
Js Code
- $ ("# 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 <=.
Note: data-options = "editable: false". Otherwise, the end date can be changed 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
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ..
Copyright, sweet potato Yao, January 12, 2017 10:18:53, Thursday
Http://www.cnblogs.com/fanshuyao/