mirror of https://github.com/ElemeFE/element
parent
d54bf670a2
commit
af4bca8abe
|
@ -145,8 +145,8 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
value(newVal) {
|
value(newVal) {
|
||||||
if (newVal instanceof Date) {
|
newVal = new Date(newVal);
|
||||||
|
if (!isNaN(newVal)) {
|
||||||
if (typeof this.disabledDate === 'function' &&
|
if (typeof this.disabledDate === 'function' &&
|
||||||
this.disabledDate(new Date(newVal))) {
|
this.disabledDate(new Date(newVal))) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -684,7 +684,7 @@ describe('DatePicker', () => {
|
||||||
vm.picker.value = date;
|
vm.picker.value = date;
|
||||||
|
|
||||||
setTimeout(_ => {
|
setTimeout(_ => {
|
||||||
expect(vm.picker.date === date).to.true;
|
expect(vm.picker.date.getTime() === date.getTime()).to.true;
|
||||||
done();
|
done();
|
||||||
}, DELAY);
|
}, DELAY);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue