laydate.js 日期插件使用

来源:互联网 发布:banner加载网络图片 编辑:程序博客网 时间:2024/06/05 03:35

形式1:
laydate({
elem: ‘#finshDate’, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 ‘#id .class’
event: ‘focus’, //响应事件。如果没有传入event,则按照默认的click
istime: true,
format: ‘YYYY-MM-DD hh:mm:ss’ //日期格式
});

形式2:

                    <td class=""><label class="">开始时间:</label></td>                    <td class="">                        <input id="beginTime" name="beginTime" type="text" maxlength="20" class="laydate-icon layer-date input-sm"                            value="<fmt:formatDate value="${eport.beginTime}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="laydate({elem: '#beginTime', istime: true, format: 'YYYY-MM-DD hh:mm:ss'});"/>                    </td>
0 0