layui设置日期最大值或者最小值为当前时间

layui.use(['form', 'laydate', 'upload', 'layer'], function () {
    var form = layui.form,
        upload = layui.upload,
        laydate = layui.laydate,
        date=new Date();
    laydate.render({
        elem: '#yyDate',
        min:'date'
    });
    laydate.render({
        elem: '#birthDay',
        max:'date'
    });
    laydate.render({
        elem: "#yyDateNext "
    });
注意看红色文字

你可能感兴趣的:(web前端)