@@ -145,8 +145,8 @@
},
value(newVal) {
- if (newVal instanceof Date) {
-
+ newVal = new Date(newVal);
+ if (!isNaN(newVal)) {
if (typeof this.disabledDate === 'function' &&
this.disabledDate(new Date(newVal))) {
return;
@@ -684,7 +684,7 @@ describe('DatePicker', () => {
vm.picker.value = date;
setTimeout(_ => {
- expect(vm.picker.date === date).to.true;
+ expect(vm.picker.date.getTime() === date.getTime()).to.true;
done();
}, DELAY);
});