From 56afd8f76012d2b37ddd52bf358b0ebe918acc9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Mon, 27 Mar 2023 12:49:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83=20laydate=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=AE=B5=E8=90=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/laydate.js | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/modules/laydate.js b/src/modules/laydate.js index 58a7e259..b5c10ca2 100644 --- a/src/modules/laydate.js +++ b/src/modules/laydate.js @@ -2228,7 +2228,21 @@ return that.hint(opts); }; - //将指定对象转化为日期值 + // 解绑实例 + laydate.unbind = function(id){ + var that = thisModule.getThis(id); + if(!that) return; + return that.unbind(); + }; + + // 关闭日期面板 + laydate.close = function(id){ + var that = thisModule.getThis(id || laydate.thisId); + if(!that) return; + return that.remove(); + }; + + // 将指定对象转化为日期值 laydate.parse = function(dateTime, format, one){ dateTime = dateTime || {}; @@ -2259,7 +2273,7 @@ return format.join(''); }; - //得到某月的最后一天 + // 得到某月的最后一天 laydate.getEndDate = function(month, year){ var thisDate = new Date(); //设置日期为下个月的第一天 @@ -2271,22 +2285,6 @@ return new Date(thisDate.getTime() - 1000*60*60*24).getDate(); }; - // 解绑实例 - laydate.unbind = function(id){ - var that = thisModule.getThis(id || laydate.thisId); - if(!that) return; - return that.unbind(); - }; - - // 关闭日期面板 - laydate.close = function(id){ - var that = thisModule.getThis(id || laydate.thisId); - if(!that) return; - return that.remove(); - }; - - - //加载方式 isLayui ? ( laydate.ready()