Skip to content

Commit

Permalink
fix(datepicker): Close on selecting date when `show-calendar-on-focus…
Browse files Browse the repository at this point in the history
…` and `typeable` are true
  • Loading branch information
mst101 committed Nov 18, 2022
1 parent bedc3b8 commit 91b035c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/DateInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,12 @@ export default {
},
isOpen(isOpen, wasOpen) {
this.$nextTick(() => {
if (this.showCalendarOnFocus) {
if (isOpen) {
this.shouldToggleOnFocus = false
}
if (isOpen && this.showCalendarOnFocus) {
if (wasOpen && !this.isInputFocused) {
this.shouldToggleOnFocus = true
return
}
this.shouldToggleOnFocus = false
}
})
},
Expand Down

0 comments on commit 91b035c

Please sign in to comment.