We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm new to Vue so, maybe this is a known limitation of the Vue framework.
If I use vue-datepicker inside a page and bind v-model to a data property, everything works as expected.
<VueDatePicker v-model="data['date']"/> data() { return { data: { date: new Date(); }, } }
But if I place VueDatePicker inside another component and then bind v-model to the property:
<VueDatePicker v-model="data['date']"/> props: { data: { type: Object, required: false, default: () => {} }, },
To make it work, I had to copy the property to a data object in the mounted method and bind v-model to the data (localdata property)
<VueDatePicker v-model="localdata['date']"/> props: { data: { type: Object, required: false, default: () => {} }, }, data() { return { localdata: {} } }, mounted() { this.localdata = Object.assign({},this.$props.data); },
So, am I doing it wrong?
This is how it has to be done?
Or, this could be fixed inside vue-datepicker to work properly with properties inside another component?
Thank you for your grate component.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm new to Vue so, maybe this is a known limitation of the Vue framework.
If I use vue-datepicker inside a page and bind v-model to a data property, everything works as expected.
But if I place VueDatePicker inside another component and then bind v-model to the property:
To make it work, I had to copy the property to a data object in the mounted method and bind v-model to the data (localdata property)
So, am I doing it wrong?
This is how it has to be done?
Or, this could be fixed inside vue-datepicker to work properly with properties inside another component?
Thank you for your grate component.
The text was updated successfully, but these errors were encountered: