Skip to content
This repository was archived by the owner on Apr 17, 2022. It is now read-only.

Commit 44f9c06

Browse files
committed
fix: Focus switch on text input
1 parent 6e88708 commit 44f9c06

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Vue3DatePicker/Vue3DatePicker.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
escClose,
9999
spaceConfirm,
100100
monthChangeOnArrows,
101+
textInput,
101102
}"
102103
v-model:internalModelValue="internalModelValue"
103104
@close-picker="closeMenu"

src/Vue3DatePicker/components/DatepickerMenu.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@
177177
escClose: { type: Boolean as PropType<boolean>, default: true },
178178
spaceConfirm: { type: Boolean as PropType<boolean>, default: true },
179179
monthChangeOnArrows: { type: Boolean as PropType<boolean>, default: true },
180+
textInput: { type: Boolean as PropType<boolean>, default: false },
180181
});
181182
const slots = useSlots();
182183
const calendarWrapperRef = ref(null);
@@ -194,7 +195,7 @@
194195
nextTick(() => emit('dpOpen'));
195196
}
196197
const menu = unrefElement(dpMenuRef);
197-
if (menu) {
198+
if (menu && !props.textInput) {
198199
menu.focus();
199200
menu.addEventListener('pointerdown', (e) => {
200201
e.stopImmediatePropagation();

0 commit comments

Comments
 (0)