Merge 44b3729b7d
into bfc0c1bf6d
commit
1c35940164
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{
|
||||
"name": "layui-laydate",
|
||||
"realname": "laydate",
|
||||
"version": "5.0.9",
|
||||
|
|
|
@ -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'));
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue