easyui datebox time limit, datebox start time limit end time, datebox expiration date is greater than the start date

easyui datebox time limit, datebox start time limit end time, datebox expiration date is greater than the start date

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>..

 Copyright  ©  Sweet Potato Yao2017年1月12日10:18:53 Thursday

http://fanshuyao.iteye.com/

 

1. Html code

Note that you need to add data-options="editable:false", you cannot directly modify the date

<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>

 

Second, js code restrictions

 

$("#contractBegtime").datebox({
	onSelect: function (beginDate) {
		$('#contractEndtime').datebox().datebox('calendar').calendar({
			validator: function(date){
				return beginDate<date;//<=
			}
		});
	}
});

 

After adding the limit, after selecting the starting date, the ending date must be greater than the starting date. If you want the ending date to be equal to the starting date,

Just use <=.

Reminder: increase the setting data-options="editable:false", otherwise the deadline can be directly modified to a time less than the start date

 

If you have other requirements, you can check the official documentation:

http://www.jeasyui.net/demo/345.html

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>..

 Copyright  ©  Sweet Potato Yao2017年1月12日10:18:53 Thursday

http://fanshuyao.iteye.com/

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327046937&siteId=291194637