记录WdatePicker控件日期选择

时间:2022-11-02 18:05:34

一、

<th>申请开始时间:</th>

<td><input type="text" class="normal-input date-input" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true,maxDate:'#F{$dp.$D(\'endDate\')}'})" name="beginDate" id="beginDate" value="" maxlength="100" />

</td>

 <th>申请结束时间:</th>

<td><input type="text"  class="normal-input date-input" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true,minDate:'#F{$dp.$D(\'beginDate\')}'})" name="endDate" id="endDate" value="" maxlength="100" />

</td>

二、

<th>开始时间:</th>
<td><input type="text" value="${detail.beginDate}" name="detail.beginDate" class="normal-input date-input" id="start${detail_index+1}" onfocus="WdatePicker({skin:'default',readOnly:true,startDate:'%y-%M-%d 12:00:00',dateFmt:'yyyy-MM-dd HH:mm',minDate:'#F{$dp.$D(\'end${detail_index+1}\',{d:-365})||$dp.$DV(\'%y-%M-%d 00:00:00\')}',maxDate:'#F{$dp.$D(\'end${detail_index+1})\',{H:-1})}',onpicked:function(dp){startAndEnd(dp);} })" readonly required/>
 </td>
<th>结束时间:</th>
<td> <input type="text" value="${detail.endDate}" name="detail.endDate" class="normal-input date-input" id="end${detail_index+1}" onfocus="WdatePicker({skin:'default',readOnly:true,startDate:'%y-%M-%d 12:00:00',dateFmt:'yyyy-MM-dd HH:mm',minDate:'#F{$dp.$D(\'start${detail_index+1}\',{H:1})||$dp.$DV(\'%y-%M-%d 00:00:00\')}',maxDate:'#F{$dp.$D(\'start${detail_index+1}\',{d:365})}',onpicked:function(dp){startAndEnd(dp);}  })" readonly required/>
</td>