5.0.4
parent
44a0847074
commit
7c4c57b55b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "layui-laydate",
|
"name": "layui-laydate",
|
||||||
"version": "5.0.3",
|
"version": "5.0.4",
|
||||||
"alias": "laydate",
|
"alias": "laydate",
|
||||||
"description": "日期与时间组件",
|
"description": "日期与时间组件",
|
||||||
"main": "src/laydate.js",
|
"main": "src/laydate.js",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
|
|
||||||
@Name : layDate 5.0.3 日期时间控件
|
@Name : layDate 5.0.4 日期时间控件
|
||||||
@Author: 贤心
|
@Author: 贤心
|
||||||
@Site:http://www.layui.com/laydate/
|
@Site:http://www.layui.com/laydate/
|
||||||
@License:MIT
|
@License:MIT
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
,laydate = {
|
,laydate = {
|
||||||
v: '5.0.3'
|
v: '5.0.4'
|
||||||
,config: {} //全局配置项
|
,config: {} //全局配置项
|
||||||
,index: (window.laydate && window.laydate.v) ? 100000 : 0
|
,index: (window.laydate && window.laydate.v) ? 100000 : 0
|
||||||
,path: ready.getPath
|
,path: ready.getPath
|
||||||
|
@ -71,6 +71,7 @@
|
||||||
,ready: function(fn){
|
,ready: function(fn){
|
||||||
var cssname = 'laydate', ver = ''
|
var cssname = 'laydate', ver = ''
|
||||||
,path = (isLayui ? 'modules/laydate/' : 'theme/') + 'default/laydate.css?v='+ laydate.v + ver;
|
,path = (isLayui ? 'modules/laydate/' : 'theme/') + 'default/laydate.css?v='+ laydate.v + ver;
|
||||||
|
if(typeof define === 'function' && define.amd) return fn();
|
||||||
isLayui ? layui.addcss(path, fn, cssname) : ready.link(path, fn, cssname);
|
isLayui ? layui.addcss(path, fn, cssname) : ready.link(path, fn, cssname);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -439,6 +440,9 @@
|
||||||
|
|
||||||
if(!options.elem[0]) return;
|
if(!options.elem[0]) return;
|
||||||
|
|
||||||
|
//默认赋值
|
||||||
|
options.value && that.setValue(options.value);
|
||||||
|
|
||||||
//日期范围分隔符
|
//日期范围分隔符
|
||||||
if(options.range === true) options.range = '-';
|
if(options.range === true) options.range = '-';
|
||||||
|
|
||||||
|
@ -927,10 +931,11 @@
|
||||||
Class.prototype.mark = function(td, YMD){
|
Class.prototype.mark = function(td, YMD){
|
||||||
var that = this
|
var that = this
|
||||||
,mark, options = that.config;
|
,mark, options = that.config;
|
||||||
|
|
||||||
lay.each(options.mark, function(key, title){
|
lay.each(options.mark, function(key, title){
|
||||||
var keys = key.split('-');
|
var keys = key.split('-');
|
||||||
if((keys[0] == YMD[0] || keys[0] == 0) && keys[1] == YMD[1] && keys[2] == YMD[2]){
|
if((keys[0] == YMD[0] || keys[0] == 0) //每年的每月
|
||||||
|
&& (keys[1] == YMD[1] || keys[1] == 0) //每月的每日
|
||||||
|
&& keys[2] == YMD[2]){ //特定日
|
||||||
mark = title || YMD[2];
|
mark = title || YMD[2];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1124,7 +1129,7 @@
|
||||||
if(yearNum < that.firstDate.year){
|
if(yearNum < that.firstDate.year){
|
||||||
ymd.month = options.min.month;
|
ymd.month = options.min.month;
|
||||||
ymd.date = options.min.date;
|
ymd.date = options.min.date;
|
||||||
} else if(yearNum > that.firstDate.year){
|
} else if(yearNum >= that.firstDate.year){
|
||||||
ymd.month = options.max.month;
|
ymd.month = options.max.month;
|
||||||
ymd.date = options.max.date;
|
ymd.date = options.max.date;
|
||||||
}
|
}
|
||||||
|
@ -1143,7 +1148,7 @@
|
||||||
ul.appendChild(li);
|
ul.appendChild(li);
|
||||||
if(listYM[0] < that.firstDate.year){
|
if(listYM[0] < that.firstDate.year){
|
||||||
ymd.date = options.min.date;
|
ymd.date = options.min.date;
|
||||||
} else if(listYM[0] > that.firstDate.year){
|
} else if(listYM[0] >= that.firstDate.year){
|
||||||
ymd.date = options.max.date;
|
ymd.date = options.max.date;
|
||||||
}
|
}
|
||||||
that.limit(lay(li), ymd, index);
|
that.limit(lay(li), ymd, index);
|
||||||
|
|
Loading…
Reference in New Issue