2π
β
In Vuetify document, the value which is passed to v-date-picker
need to be an array or string. You can convert:
methods: {
onSaveChanges () {
const newDate = new Date(this.meetup.date)
const newDay = new Date(this.editableDate).getUTCDate()
const newMonth = new Date(this.editableDate).getUTCMonth()
const newYear = new Date(this.editableDate).getUTCFullYear()
newDate.setUTCDate(newDay)
newDate.setUTCMonth(newMonth)
newDate.setUTCFullYear(newYear)
this.$store.dispatch('updateMeetupData', {
id: this.meetup.id,
date: newDate.toISOString().substr(0, 10)
})
}
},
created () {
this.editableDate = new Date(this.meetup.date).toISOString().substr(0, 10)
}
Source:stackexchange.com