0
点赞
收藏
分享

微信扫一扫

layui 设置日期控件不能手动输入,必须选择时间

我是小小懒 2022-01-27 阅读 67

因为业务需求,只能选择不能输入。

html:
<input type="text" name="end_time" placeholder="结束时间" class="layui-input" id="end_time" onfocus="this.type='text'" autocomplete="off" style="display:inline-block;width:250px;" readonly >

js:
laydate.render({
    elem: '#end_time', //指定元素
    type: 'date',
    trigger: 'click',
    min: '<?php echo date('Y-m-d',strtotime('+1 day'));?>',//最小起始时间
});

爱资料工具-好用的在线工具箱icon-default.png?t=M0H8https://www.toolnb.com/

举报

相关推荐

0 条评论