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
Datepicker doesn't update value without hovering over it #4827
Comments
https://codepen.io/Hiws/pen/MWwJNKL Short demo of the issue. Oddly enough if you change it multiple times, it will update after the 2nd time without hovering, however be 1 update out-of-sync. |
Interesting... What if you wrap the manual update of the v-model in a |
This codepen works: https://codepen.io/tmorehouse/pen/dyoNxeW Note that since you are setting the value (v-model) as a |
The codepen you linked looks to have the same issue still. |
Strange... for me (Chrome on Windows), it is working with the change. |
Very strange... I still have the issue aswell with the codepen you linked also Chrome on Windows |
Do you see a similar issue when changing the v-model on the |
Actually this is fixed in PR #4824 There was a typo in the data property for the You can try it out in the dev docs playgound: https://bootstrap-vue.netlify.com/play |
this is happening to me also, i dont know whats going on! ... it seems to work good when i open a modal and try to edit information the date renders ok, but when i try to get info from a data base and for example the page loads it has that problem |
@reydez See comment #4827 (comment) above |
A little workaround for this issue. Just wrap your component in a div that displays if you initialized your component. <div v-if="initialized">
... private async mounted() {
this.date = await ...
this.initialized = true
} |
BootstrapVue 2.6.0 has been released |
BootstrapVue 2.6.0 has been released |
Describe the bug
When the v-model of the datepicker changes externally, it doesn't update the displayed value untill you hover over it. By default I initialize the v-model to new Date() but in some cases I will overwrite this value by something I fetch from my API.
I worked like this:
Expected behavior
The datepicker should update when it's v-model updates.
Versions
Libraries:
Environment:
The text was updated successfully, but these errors were encountered: