layDate 日期与时间插件

首先第一步

  在官方下载layDate文件。layUI官网:http://layer.layui.com/    https://www.layui.com/laydate/

引入layData.js

<script src="../js/public/laydate.js"></script>

要显示的时间文本框

<input type="text" class="input w50" id="applytime" name="applytime"/>

js方法

   laydate.render({
     elem: '#applytime',  // 输出框id
     type: 'datetime'
    });

猜你喜欢

转载自www.cnblogs.com/lyt0207/p/12822232.html