Commit 66cad95a authored by ChuckFields's avatar ChuckFields Committed by cinwell.li

DatePicker: Fix Typing a date and tabbing does not close the calendar #4948 (#5149)

* DatePicker: Fix Typing a date and tabbing does not close the calendar #4948

* DatePicker: Fix Typing a date and tabbing does not close the calendar #4948 -Updated test case
parent a1ec75b2
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
this.date = newVal; this.date = newVal;
this.year = newVal.getFullYear(); this.year = newVal.getFullYear();
this.month = newVal.getMonth(); this.month = newVal.getMonth();
this.$emit('pick', newVal, true); this.$emit('pick', newVal, false);
} }
}, },
......
...@@ -385,7 +385,7 @@ describe('DatePicker', () => { ...@@ -385,7 +385,7 @@ describe('DatePicker', () => {
input.value = '2000-10-1'; input.value = '2000-10-1';
triggerEvent(input, 'change', true); triggerEvent(input, 'change', true);
setTimeout(_ => { setTimeout(_ => {
expect(vm.pickerVisible).to.true; // 敲回车不会消失 expect(vm.pickerVisible).to.false;
expect(vm.picker.date.getFullYear()).to.equal(2000); expect(vm.picker.date.getFullYear()).to.equal(2000);
expect(vm.picker.date.getMonth()).to.equal(9); expect(vm.picker.date.getMonth()).to.equal(9);
expect(vm.picker.date.getDate()).to.equal(1); expect(vm.picker.date.getDate()).to.equal(1);
......
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