Skip to content

Commit 91b035c

Browse files
committed
fix(datepicker): Close on selecting date when show-calendar-on-focus and typeable are true
1 parent bedc3b8 commit 91b035c

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)