Commit 46650289 authored by xingoxu's avatar xingoxu Committed by 杨奕

DatePicker: fix date not disabled when type=datetime and input by text

parent fff57cdf
......@@ -407,13 +407,17 @@
set(val) {
const date = parseDate(val, 'yyyy-MM-dd');
if (date) {
date.setHours(this.date.getHours());
date.setMinutes(this.date.getMinutes());
date.setSeconds(this.date.getSeconds());
this.date = date;
this.resetView();
if (!date) {
return;
}
if (typeof this.disabledDate === 'function' && this.disabledDate(date)) {
return;
}
date.setHours(this.date.getHours());
date.setMinutes(this.date.getMinutes());
date.setSeconds(this.date.getSeconds());
this.date = date;
this.resetView();
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment