Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-apply doesn't work for text input #1080

Open
cotowamasha opened this issue Feb 17, 2025 · 0 comments
Open

Auto-apply doesn't work for text input #1080

cotowamasha opened this issue Feb 17, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@cotowamasha
Copy link

Describe the bug
If user inputs correct dates to text input, vue-datepicker (with auto-apply prop) doesn't emit update:model-value, but it changes internal-model.

To Reproduce
Steps to reproduce the behavior:

  1. Make vue-dp like that:
<template>
    <div class="wrapper">
        selected: {{ selectedDate }}
        <Datepicker
            v-model="selectedDate"
            text-input
            range
            format="MM.dd.yyyy"
            multi-calendars
            position="left"
            auto-apply
            :config="{
                setDateOnMenuClose: true,
                closeOnClearValue: false,
                closeOnAutoApply: false,
                keepActionRow: true,
            }"
        >
            <template #dp-input="{ value, onInput }">
                <input :value="value" @input="onInput" />
            </template>
        </Datepicker>
    <div>
</template>

<script lang="ts" setup>
    import { ref } from 'vue';

    const selectedDate = ref();
</script>
  1. Select any dates in calendar.
  2. update:model-value emitted ✅
  3. Change time.
  4. update:model-value emitted ✅
  5. Change value in input
  6. update:model-value wasn't emitted ❌
  7. update:model-valueemits after close calendar or click Select button.

Expected behavior
If user inputs correct dates, vue-dp emits update:model-value immediately.

Screencast

2025-02-17.15.50.03.mov

Desktop & mobile:

  • Browser all
  • Library version 11.0.1
@cotowamasha cotowamasha added awaiting triage The issue is not reviewed by the maintainers bug Something isn't working labels Feb 17, 2025
@Jasenkoo Jasenkoo removed the awaiting triage The issue is not reviewed by the maintainers label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants