Skip to content

Commit 184b557

Browse files
authored
Merge pull request sumcumo#187 from mst101/fix/typeable-show-calendar-on-focus-date-selection
Close calendar on selecting a date when `typeable` and `show-calendar-on-focus` are true
2 parents a085ad4 + 91b035c commit 184b557

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/DateInput.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,12 @@ export default {
129129
},
130130
isOpen(isOpen, wasOpen) {
131131
this.$nextTick(() => {
132-
if (this.showCalendarOnFocus) {
133-
if (isOpen) {
134-
this.shouldToggleOnFocus = false
135-
}
132+
if (isOpen && this.showCalendarOnFocus) {
136133
if (wasOpen && !this.isInputFocused) {
137134
this.shouldToggleOnFocus = true
135+
return
138136
}
137+
this.shouldToggleOnFocus = false
139138
}
140139
})
141140
},

0 commit comments

Comments
 (0)