Closed appdrops closed 6 years ago
I'm having the same problem. I was hoping to get some help on it. Oh well...
So I hotfixed this bug on my machine :
Datepicker.vue - line22, fix event handling :
<span v-for="d in dateRange" :class="d.sclass" @click="daySelect(d.date,$event)">{{d.text}}</span>
Datepicker.vue - line 188, access element classlist properly :
if (el.target.classList[0] === 'datepicker-item-disable') {
There's still a warning because props are mutated directly but it works. I have to move on but i'll try to fix the warning too. Then maybe do a commit here.
Thanks, @Thibzzz!
still have this problem,and report warn
Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "value"
Yeah two way binding with sync is essentially dead on Vue2 with .sync deprecation (which this component relies on). So any component relying on .sync in Vue 2.0 + is now compromised. I fixed the problem locally by adding an external variable as a props to modify with v-model and removed .sync all together. I suggest you do the same. Bluntly resumed : sync is dead so this won't work anymore. -> https://forum-archive.vuejs.org/topic/4288/best-practices-to-replace-sync/4
Hi guys. Is there any information about fixing this issue?
I have same problem so far.
me too and it seems like it's an old bug that is still open very sad
I'm not sure what classList refers to but I couldn't get it to work. I ended up removing the if statement below and it worked fine.
daySelect (date, el) { if (el.$el.classList[0] === 'datepicker-item-disable') { return false } else { this.currDate = date this.value = this.stringify(this.currDate) this.displayDayView = false } },