Easyui datebox time limit, datebox Start Time Limit End Time, datebox end date is greater than the start date, easyuidatebox

Source: Internet
Author: User

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
  1. <Tr>
  2. <Td width = "15%" class = "label"> contract start date: </td>
  3. & Lt; td width = "35%" & gt;
  4. <Input value = "$ {loan. contractBegtime} "class =" f1 easyui-datebox "id =" contractBegtime "name =" contractBegtime "data-options =" required: true, editable: false "/>
  5. <Font class = "star-red"> * </font>
  6. </Td>
  7. <Td width = "15%" class = "label"> contract deadline: </td>
  8. & Lt; td width = "35%" & gt;
  9. <Input value = "$ {loan. contractEndtime} "class =" f1 easyui-datebox "id =" contractEndtime "name =" contractEndtime "data-options =" required: true, editable: false "/>
  10. <Font class = "star-red"> * </font>
  11. </Td>
  12. </Tr>

 

Ii. js Code restrictions

 

Js Code
  1. $ ("# ContractBegtime"). datebox ({
  2. OnSelect: function (beginDate ){
  3. $ ('# ContractEndtime'). datebox (). datebox ('Calendar'). calendar ({
  4. Validator: function (date ){
  5. Return beginDate <date; // <=
  6. }
  7. });
  8. }
  9. });

 

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/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.