Commit af4bca8a authored by cinwell.li's avatar cinwell.li Committed by 杨奕

DatePicker: update view when setting default value, fixed #1050 (#1097)

parent d54bf670
......@@ -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);
});
......
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