v-calendar: Input value doesn't update after a manual change of the date
I have created a simple v-date-picker
. Once I change the date manually, selecting a new date using the mouse is not triggering the update of the input value anymore.
<v-date-picker mode='single' v-model='selectedValue'> </v-date-picker>
PS. I have seen that with Version 0.9.7 this thing was working.
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 13
- Comments: 19
If you still can’t fix it. This must work. If you update the range data using a method it will not re-render the Date-Picker component. So an easy fix is to add a key to the Date-Picker component and change the key every time you change the date from the method.
Experiencing this too. I ended up using value from computed / pass the value to computed first.
Previously I used value from
data()
and it didnt work, but when value comes from props it works and also works on props changeIn my case, I have a ‘range’ type. I set up the start and end value by code but I don’t know what to do to refresh the input, currently looking.
This is how I did, In case someone encounter the same problem:
Here,
quickFilter
returns object containingstart
andend
properties.Yes definitely did the trick. However I do not like the fact that it is not updating automatically.
@parthjani7 this answer is awesome! Thank you
call this.$forceUpdate()
If you set value for
dateRange
manually, inside a method lets say. This will trigger which I don’t want to happen.can confirm this still does the trick, thank you!