mirror of https://github.com/ElemeFE/element
* 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 casepull/5289/head
parent
a1ec75b2f4
commit
66cad95a4b
|
@ -161,7 +161,7 @@
|
|||
this.date = newVal;
|
||||
this.year = newVal.getFullYear();
|
||||
this.month = newVal.getMonth();
|
||||
this.$emit('pick', newVal, true);
|
||||
this.$emit('pick', newVal, false);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -385,7 +385,7 @@ describe('DatePicker', () => {
|
|||
input.value = '2000-10-1';
|
||||
triggerEvent(input, 'change', true);
|
||||
setTimeout(_ => {
|
||||
expect(vm.pickerVisible).to.true; // 敲回车不会消失
|
||||
expect(vm.pickerVisible).to.false;
|
||||
expect(vm.picker.date.getFullYear()).to.equal(2000);
|
||||
expect(vm.picker.date.getMonth()).to.equal(9);
|
||||
expect(vm.picker.date.getDate()).to.equal(1);
|
||||
|
|
Loading…
Reference in New Issue