mirror of https://github.com/layui/layui
微调 laydate 代码段落
parent
596fcf0f8b
commit
56afd8f760
|
@ -2228,7 +2228,21 @@
|
||||||
return that.hint(opts);
|
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){
|
laydate.parse = function(dateTime, format, one){
|
||||||
dateTime = dateTime || {};
|
dateTime = dateTime || {};
|
||||||
|
|
||||||
|
@ -2259,7 +2273,7 @@
|
||||||
return format.join('');
|
return format.join('');
|
||||||
};
|
};
|
||||||
|
|
||||||
//得到某月的最后一天
|
// 得到某月的最后一天
|
||||||
laydate.getEndDate = function(month, year){
|
laydate.getEndDate = function(month, year){
|
||||||
var thisDate = new Date();
|
var thisDate = new Date();
|
||||||
//设置日期为下个月的第一天
|
//设置日期为下个月的第一天
|
||||||
|
@ -2271,22 +2285,6 @@
|
||||||
return new Date(thisDate.getTime() - 1000*60*60*24).getDate();
|
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 ? (
|
isLayui ? (
|
||||||
laydate.ready()
|
laydate.ready()
|
||||||
|
|
Loading…
Reference in New Issue