-
-
Notifications
You must be signed in to change notification settings - Fork 176
Open
Labels
awaiting triageThe issue is not reviewed by the maintainersThe issue is not reviewed by the maintainersbugSomething isn't workingSomething isn't working
Description
Describe the bug
Text input with selectOnFocus set to true loose input focus after first click in v12.1.0. This is a regression from version 12.0.5 where the same code works correctly.
To Reproduce
Steps to reproduce the behavior:
- Use VueDatePicker with selectOnFocus option set to true
- Click on text input
- Input looses focus (you have to click another time on the input)
<template>
<div class="mx-auto max-w-screen-xl px-4">
<div class="w-full mb-5 mt-20">
<div>Vue Datepicker v12.0.5</div>
<div class="mt-2">
<VueDatePicker
v-model="date"
model-type="yyyy-MM-dd"
:text-input="{ selectOnFocus: true }"
:formats="{ input: 'dd/MM/yyyy' }"
:auto-apply="true"
:flow="{ steps: ['year', 'month', 'calendar'], partial: true }"
/>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { VueDatePicker } from '@vuepic/vue-datepicker';
import '@vuepic/vue-datepicker/dist/main.css';
const date = ref();
</script>
Expected behavior
When you click on the input you should be able to type the date without the need to click another time on the input.
Stackblitz Links
v12.0.5 (Working): https://stackblitz.com/edit/github-bgfv7iv5-vwkgychj?file=src%2Fviews%2FHome.vue
v12.1.0 (Broken): https://stackblitz.com/edit/github-bgfv7iv5-vy2uczsj?file=src%2Fviews%2FHome.vue
Video
Capture.video.du.2025-12-10.15-58-49.webm
Metadata
Metadata
Assignees
Labels
awaiting triageThe issue is not reviewed by the maintainersThe issue is not reviewed by the maintainersbugSomething isn't workingSomething isn't working