Is there an option to disable all weekends on the calendar?
<date-picker v-model="value" lang="en" :disabled-days="disableWeekends"></date-picker>
methods: {
disableWeekends (date) {
const day = new Date(date).getDay()
return day === 0 || day === 6
}
}
"Invalid prop: type check failed for prop 'disabledDays'. Expected Array, got Function." I accepts both array and function, right?
upgrade to v2.x
Hey, I upgraded to v2.1.0. I'm not getting the "invalid prop" error for "disabledDays" anymore, but the disabling is still not happening. In fact, now my "not-before" and "not-after" are also not getting disabled.
If I switch back to 1.9.8, it works fine. But I need the "disabledDays" function for which like you mentioned, I'll have to use v2.x
Could you please help.
Thanks!
Not "disabled-days". Correctly is "disabled-date"
Most helpful comment