wdatepicker时间段控制

只能选择此刻以前的日期

<input class="form-control" type="text"  name="startDate" id="startDate" value="" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss', maxDate:'%y-%M-%d',readOnly:true})"/>

只能选择此刻以后的日期

<input class="form-control" type="text"  name="endDate" id="endDate" value="" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss', minDate:'%y-%M-%d',readOnly:true})"/>

时间段

<input class="easyui-validatebox" id="stardate"  onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'endate\');}',minDate:'#F{$dp.$D(\'endate\',{y:-3});}',dateFmt:'yyyy-MM-dd '})"  type="text" name="outTime" required="true" readonly="readonly" onchange="setdate();" style="width:85%;"/>
<input class="easyui-validatebox" type="text" id="endate" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'stardate\');}',maxDate:'#F{$dp.$D(\'stardate\',{y:3});}',dateFmt:'yyyy-MM-dd '})" name="outlimit" required="true" readonly="readonly" style="width:83%;"/>
posted @ 2017-12-26 15:31  敲代码的小浪漫  阅读(1619)  评论(0编辑  收藏  举报