单个选择

<div class=”formControls col-xs-8 col-sm-9″>
{literal}

<input type=”text” onfocus=”WdatePicker({Date:’#F{$dp.$D(\’logmin\’)}’,Date:’%y/%M/%d’})” name=”create_time” id=”create_time” class=”input-text Wdate” style=”width:120px;”>

{/literal}
</div>

间隔时间
{literal}
<input type=”text” onfocus=”WdatePicker({dateFmt: ‘yyyy-MM-dd HH:mm:ss’ ,maxDate:’#F{$dp.$D(\’logmax\’)||\’%y-%M-%d #{%H-20}:%m:%s\’}’})” id=”logmin” class=”input-text Wdate” style=”width:180px;”>

<input type=”text” onfocus=”WdatePicker({dateFmt: ‘yyyy-MM-dd HH:mm:ss’ ,minDate:’#F{$dp.$D(\’logmin\’)}’,maxDate:’%y-%M-%d’})” id=”logmax” class=”input-text Wdate” style=”width:180px;”>

{/literal}

不显示时分秒:

{literal}
<input type=”text” onfocus=”WdatePicker({maxDate:’#F{$dp.$D(\’logmax\’)||\’%y/%M/%d\’}’})” name=”logmin” id=”logmin” class=”input-text Wdate” style=”width:120px;” placeholder=”起始日期”>

<input type=”text” onfocus=”WdatePicker({minDate:’#F{$dp.$D(\’logmin\’)}’,maxDate:’%y/%M/%d’})” name=”logmax” id=”logmax” class=”input-text Wdate” style=”width:120px;” placeholder=”截止日期”> {/literal}

引用js

<script type=”text/javascript” src=”__STATIC__/lib/My97DatePicker/4.8/WdatePicker.js”></script>

发表评论