添加了monthChang配置用于切换月份是否触发chang事件
parent
47fade228a
commit
44b3729b7d
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",
|
"name": "layui-laydate",
|
||||||
"realname": "laydate",
|
"realname": "laydate",
|
||||||
"version": "5.0.9",
|
"version": "5.0.9",
|
||||||
|
|
|
@ -392,6 +392,8 @@
|
||||||
,done: null //控件选择完毕后的回调,点击清空/现在/确定也均会触发
|
,done: null //控件选择完毕后的回调,点击清空/现在/确定也均会触发
|
||||||
,change: null //日期时间改变后的回调
|
,change: null //日期时间改变后的回调
|
||||||
,yearChange:true //年切换时触发事件
|
,yearChange:true //年切换时触发事件
|
||||||
|
,monthChange:true //月切换时触发事件
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//多语言
|
//多语言
|
||||||
|
@ -1692,7 +1694,7 @@
|
||||||
,month: YM[1]
|
,month: YM[1]
|
||||||
});
|
});
|
||||||
that.checkDate('limit').calendar();
|
that.checkDate('limit').calendar();
|
||||||
options.range || that.done(null, 'change');
|
options.range || (options.monthChange && that.done(null, 'change'));
|
||||||
}
|
}
|
||||||
,nextMonth: function(){
|
,nextMonth: function(){
|
||||||
var YM = that.getAsYM(dateTime.year, dateTime.month);
|
var YM = that.getAsYM(dateTime.year, dateTime.month);
|
||||||
|
@ -1701,7 +1703,7 @@
|
||||||
,month: YM[1]
|
,month: YM[1]
|
||||||
});
|
});
|
||||||
that.checkDate('limit').calendar();
|
that.checkDate('limit').calendar();
|
||||||
options.range || that.done(null, 'change');
|
options.range || (options.monthChange && that.done(null, 'change'));
|
||||||
}
|
}
|
||||||
,nextYear: function(){
|
,nextYear: function(){
|
||||||
if(addSubYeay()) return;
|
if(addSubYeay()) return;
|
||||||
|
|
Loading…
Reference in New Issue