pull/82/merge
gjianbo 2019-04-04 05:37:10 +00:00 committed by GitHub
commit 1c35940164
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2774 additions and 8 deletions

2
dist/laydate.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2763
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
{
{
"name": "layui-laydate",
"realname": "laydate",
"version": "5.0.9",

View File

@ -391,6 +391,9 @@
,zIndex: null //控件层叠顺序
,done: null //控件选择完毕后的回调,点击清空/现在/确定也均会触发
,change: null //日期时间改变后的回调
,yearChange:true //年切换时触发事件
,monthChange:true //月切换时触发事件
};
//多语言
@ -1668,7 +1671,7 @@
year: listYM[0]
});
if(isAlone) that[startEnd].year = listYM[0];
options.range || that.done(null, 'change');
options.range || (options.yearChange && that.done(null, 'change'));
that.setBtnStatus();
options.range || that.limit(lay(that.footer).find(ELEM_CONFIRM), {
year: listYM[0]
@ -1682,7 +1685,7 @@
if(addSubYeay('sub')) return;
dateTime.year--;
that.checkDate('limit').calendar();
options.range || that.done(null, 'change');
options.range || (options.yearChange && that.done(null, 'change'));
}
,prevMonth: function(){
var YM = that.getAsYM(dateTime.year, dateTime.month, 'sub');
@ -1691,7 +1694,7 @@
,month: YM[1]
});
that.checkDate('limit').calendar();
options.range || that.done(null, 'change');
options.range || (options.monthChange && that.done(null, 'change'));
}
,nextMonth: function(){
var YM = that.getAsYM(dateTime.year, dateTime.month);
@ -1700,13 +1703,13 @@
,month: YM[1]
});
that.checkDate('limit').calendar();
options.range || that.done(null, 'change');
options.range || (options.monthChange && that.done(null, 'change'));
}
,nextYear: function(){
if(addSubYeay()) return;
dateTime.year++
that.checkDate('limit').calendar();
options.range || that.done(null, 'change');
options.range || (options.yearChange && that.done(null, 'change'));
}
};
};