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

Source: Internet
Author: User

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!

Related Article

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.