mirror of
https://gitee.com/layui/layui.git
synced 2025-05-04 12:48:00 +08:00
Merge pull request #1183 from layui/main
修复 laydate 日期范围的 done 返回数据异常问题
This commit is contained in:
commit
79a61e44b7
@ -607,7 +607,7 @@
|
|||||||
that.choose(lay(elem).find('td.layui-this'))
|
that.choose(lay(elem).find('td.layui-this'))
|
||||||
} else if (type === 'year' || type === 'month') {
|
} else if (type === 'year' || type === 'month') {
|
||||||
if(lay(elemMain[0]).find('.' + ELEM_MAIN + ' li.' + THIS + ':not(.laydate-disabled)')[0]) {
|
if(lay(elemMain[0]).find('.' + ELEM_MAIN + ' li.' + THIS + ':not(.laydate-disabled)')[0]) {
|
||||||
that.setValue(that.parse()).remove().done();
|
that.setValue(that.parse()).done().remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1412,7 +1412,7 @@
|
|||||||
//且在范围未开启时
|
//且在范围未开启时
|
||||||
if(!options.range && options.autoConfirm){
|
if(!options.range && options.autoConfirm){
|
||||||
if((options.type === 'month' && type === 'month') || (options.type === 'year' && type === 'year')){
|
if((options.type === 'month' && type === 'month') || (options.type === 'year' && type === 'year')){
|
||||||
that.setValue(that.parse()).remove().done();
|
that.setValue(that.parse()).done().remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1814,7 +1814,7 @@
|
|||||||
} else if(options.position === 'static'){ //直接嵌套的选中
|
} else if(options.position === 'static'){ //直接嵌套的选中
|
||||||
that.calendar().done().done(null, 'change'); //同时执行 done 和 change 回调
|
that.calendar().done().done(null, 'change'); //同时执行 done 和 change 回调
|
||||||
} else if(options.type === 'date'){
|
} else if(options.type === 'date'){
|
||||||
options.autoConfirm ? that.setValue(that.parse()).remove().done() : that.calendar().done(null, 'change');
|
options.autoConfirm ? that.setValue(that.parse()).done().remove() : that.calendar().done(null, 'change');
|
||||||
} else if(options.type === 'datetime'){
|
} else if(options.type === 'datetime'){
|
||||||
that.calendar().done(null, 'change');
|
that.calendar().done(null, 'change');
|
||||||
}
|
}
|
||||||
@ -1854,8 +1854,8 @@
|
|||||||
,delete that.startTime
|
,delete that.startTime
|
||||||
,delete that.endTime
|
,delete that.endTime
|
||||||
);
|
);
|
||||||
that.setValue('').remove();
|
that.setValue('');
|
||||||
that.done(['', {}, {}]);
|
that.done(['', {}, {}]).remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 现在
|
// 现在
|
||||||
@ -1873,9 +1873,9 @@
|
|||||||
,seconds: thisDate.getSeconds()
|
,seconds: thisDate.getSeconds()
|
||||||
});
|
});
|
||||||
|
|
||||||
that.setValue(that.parse()).remove();
|
that.setValue(that.parse());
|
||||||
isStatic && that.calendar();
|
isStatic && that.calendar();
|
||||||
that.done();
|
that.done().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
//确定
|
//确定
|
||||||
@ -1888,8 +1888,8 @@
|
|||||||
if(lay(btn).hasClass(DISABLED)) return that.hint(lang.invalidDate);
|
if(lay(btn).hasClass(DISABLED)) return that.hint(lang.invalidDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
that.setValue(that.parse()).remove();
|
that.setValue(that.parse());
|
||||||
that.done();
|
that.done().remove();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
active[type] && active[type]();
|
active[type] && active[type]();
|
||||||
|
Loading…
Reference in New Issue
Block a user