JQuery EasyUI date control how to control the date selection interval
- 2020-03-30 02:51:54
- OfStack
<tr><th> Launch start date </th>
<td><input type="text" id="usLineTime" name="usLineTime" size="20" class='easyui-validatebox Wdate'
onFocus="WdatePicker({el:'usLineTime',dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D('ueLineTime')}'})"
value="<fmt:formatDate value="${product.usLineTime}" pattern ="yyyy-MM-dd" />" required="true"/></td></tr>
<tr><th> Closing date </th><td>
<input type="text" id="ueLineTime" name="ueLineTime" size="20" class='easyui-validatebox Wdate'
onFocus="WdatePicker({el:'ueLineTime',dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D('usLineTime')}'})"
value="<fmt:formatDate value="${product.ueLineTime}" pattern ="yyyy-MM-dd" />" required="true"/>
</td></tr>
Note: ueLineTime is the current time and mainly controls the date control.
MaxDate is a maximum of the current date can only be selected, greater than the current date gray, can not be selected.
The principle of minDate is the same as above.