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
pull/5289/head
ChuckFields 2017-06-09 06:41:30 -04:00 committed by cinwell.li
parent a1ec75b2f4
commit 66cad95a4b
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}
},

View File

@ -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);