layui YYYY-mm-dd HH:MM:SS最大时间默认当天 23:59:59
生活随笔
收集整理的這篇文章主要介紹了
layui YYYY-mm-dd HH:MM:SS最大时间默认当天 23:59:59
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
html 代碼
//清除歷史緩存 autocomplete="off" <input type="text" class="layui-input form-control" id="date-time" name="date-time" autocomplete="off">js代碼
layui.use('laydate', function () {let layDate = layui.laydate;let maxDate = dateFormat('YYYY-mm-dd 23:59:59',new Date());//日期范圍layDate.render({elem: '#date-time',range: '~',format: 'yyyy-MM-dd hh:mm:ss',type:'datetime',max:maxDate,//選擇結(jié)束日期默認當天23:59:59ready: function(date){$(".layui-laydate-footer [lay-type='datetime'].laydate-btns-time").click();$(".laydate-main-list-1 .layui-laydate-content li ol li:last-child").click();$(".layui-laydate-footer [lay-type='date'].laydate-btns-time").click();}});});總結(jié)
以上是生活随笔為你收集整理的layui YYYY-mm-dd HH:MM:SS最大时间默认当天 23:59:59的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 01. Excel_数据处理_基本操作(
- 下一篇: 你的服务器没有正确响应Token验证的解