icehaunter / vue3-datepicker

Simple datepicker component for Vue 3
https://icehaunter.github.io/vue3-datepicker/
MIT License
151 stars 151 forks source link

Typeable prop not working with v-model #75

Closed pelomedusa closed 1 year ago

pelomedusa commented 2 years ago

When using v-model with the prop :typeable="true", the value is parsed as soon as the format is recognized which results in the following behavior: Kazam_screencast_00016

This may be related to #55 , but unfortunately the issue is in russian, and i do not speak russian :)

Here is the code sample:

<template>
  <label for="" >
    <Datepicker
        v-model="dateValue"
        inputFormat="dd/MM/yyyy"
        :typeable="true"
    />
  </label>
</template>

<script>
import Datepicker from "vue3-datepicker";
import {ref} from "vue";

export default {
  components: {
    Datepicker
  },
  setup(){
    const dateValue = ref(null);
    return {dateValue}
  }
}
</script>
icehaunter commented 1 year ago

Fixed in https://github.com/icehaunter/vue3-datepicker/pull/61 (since v0.3.2)