Skip to content

Commit d89ea19

Browse files
committed
fix(datepicker): Disable show-calendar-on-focus when show-calendar-on-button-click is true
1 parent 66b59aa commit d89ea19

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/DateInput.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,12 @@ export default {
250250
}
251251
},
252252
/**
253-
* Opens the calendar when `show-calendar-on-focus` is true
253+
* Opens the calendar when `show-calendar-on-focus` is true (unless `show-calendar-on-button-click` is true)
254254
*/
255+
// eslint-disable-next-line complexity
255256
handleInputFocus() {
257+
if (this.showCalendarOnButtonClick) return
258+
256259
this.isInputFocused = true
257260
258261
if (!this.isOpen && this.shouldToggleOnFocus) {

0 commit comments

Comments
 (0)