Open robert-jf-close opened 3 years ago
I have a solution.
The above code snippet will first set the model value and then will reflect the change on the input field (code inside timeout)
I have the same bug.
The easiest solution for me was to add a :key binding like this:
<vue-timepicker v-model="value" :key="refresh"></vue-timepicker>
refresh value is changing when the value is changed by any methods in component. Changing the :key value remounts the component.
One way to solve this problem was by adding a modelValue watch in VueTimePicker.vue.
watch: {
...
modelValue(){
this.readValues();
},
...
}
Is it possible to add this fix in the repository @phoenixwong ?
I have the same bug. The easiest solution for me was to add a :key binding like this:
<vue-timepicker v-model="value" :key="refresh"></vue-timepicker>
refresh value is changing when the value is changed by any methods in component. Changing the :key value remounts the component.
THIS WORKED I USED MY V-MODEL AS KEY thx owo <3
The "v-model" or :modelValue attributes are not reactively bound to the displayed time.
Example: I create a modal containing a vue-timepicker with:
If I then change the myObject.time value in a method in this file, the time displayed by the time picker is NOT changed.