layui 时间前后节点验证

原文链接: https://www.mk2048.com/blog/blog.php?id=h0c11kj0kjkj&title=layui+%E6%97%B6%E9%97%B4%E5%89%8D%E5%90%8E%E8%8A%82%E7%82%B9%E9%AA%8C%E8%AF%81
            var start = {
                  istime: true,
                  format: 'YYYY-MM-DD hh:mm:ss',
                  max: '2099-06-16',
                  istoday: true,
                  choose: function (datas) {
                      end.min = datas; //开始日选好后,重置结束日的最小日期
                      timeConflictJudgment()
                  }
              };
    
              var end = {
                  istime: true,
                  format: 'YYYY-MM-DD hh:mm:ss',
                  max: '2099-06-16',
                  istoday: true, 
                  choose: function (datas) {
                      start.max = datas; //结束日选好后,重置开始日的最大日期
                      timeConflictJudgment()
                  }
              };
                
              document.getElementById('carInsuranceStartTime').onclick = function () {
                  start.elem = this;
                  laydate(start);
              };
              document.getElementById('carInsuranceEndTime').onclick = function () {
                  end.elem = this;
                  laydate(end);
              };

更多专业前端知识,请上 【猿2048】www.mk2048.com

猜你喜欢

转载自blog.csdn.net/whiteGay/article/details/102766025