重新设置laydate中最大值max

//监听订单下拉框
    form.on('select(orderId)', function (data) {
        var orderId = data.value;
        $("#equipId").html("");
        if(!isNull(orderId)){
            Comm.ajaxPost('${ctx}/***/*****/manage/list/equipList', {orderId: orderId}, function (res) {
                if (res.success) {
                    //选择订单后交付日期重新渲染
                    $("#operTime").remove();
                    $("#openDate").html('<input type="text" class="layui-input" name="operTime" id="operTime" autocomplete="off"/>');
                    var dateInfo = res.data.deliveryTime.substring(0,10);
                    laydate.render({
                        elem: '#operTime', //指定元素
                        type: 'date',
                        max: dateInfo
                    });
                    $("#equipId").empty();
                    $("#equipId").append("<option value=''>请选择设备</option>");
                    $.each(res.data.equipList, function(idx, obj) {
                        $("#equipId").append("<option value="+obj.equipId+">"+obj.equipName+"</option>");
                    });
                    form.render('select');
                }
            });
        }else {
            $("#equipId").append("<option value=''>请选择设备</option>");
        }
        form.render('select');
    });
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值