my97date设置控件显示时分秒,设置时分秒显示为00:00:00,或者设置默认值


       

<tr>
<th width="15%"
style="color: #2469ac; background-color: #e6f8fd; line-height: 28px;">
选择日期:
</th>
<td style="padding: 5px; line-height: 22px; width: 80%">
开始时间:
<input id="startDate" name="startDates" style="width: 135px;" class='Wdate' value='${fgStreetTown.startDateStr}' onFocus="WdatePicker({startDate:'%y-%M-%d 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结束时间:
<input id="endDate" name="endDates" style="width: 135px;" class='Wdate' value='${fgStreetTown.endDateStr}' onFocus="WdatePicker({startDate:'%y-%M-%d 23:59:59',dateFmt:'yyyy-MM-dd HH:mm:ss'})" />


</td>
</tr>

 年月日的话 <input id="endDate" name="endDates" style="width: 135px;" class='Wdate' value='${fgStreetTown.endDateStr}' onFocus="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss'})" />

年月日就是当前日期,比如今天是2018年8月3日那么就是2018-08-03 00:00:00

若要显示当前月份的1号那么就是οnclick="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss'})"

猜你喜欢

转载自www.cnblogs.com/lwfy/p/11350496.html
今日推荐