0👍
Just use :min="tomorrow"
?
data() {
const today = new Date()
return { tomorrow: new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1)
}
}
Or use the :allowed-date
prop to allow everything except for today:
<v-date-picker :allowed-dates="allowedDates" />
methods: {
allowedDates(date) {
return !isToday(date)
}
}
- [Vuejs]-How to do dynamic vue routing correctly?
- [Vuejs]-Vueuse useDark function blocking the ability to transition an element
0👍
<template>
<v-date-picker v-model="dateTo" :max="maxDateAllowed"></v-date-picker>
</template>
computed: {
maxDateAllowed() {
const d = new Date()
const endDate = new Date(d.getFullYear(), d.getMonth(), d.getDate() - 1);
return endDate.toISOString().slice(0,10)
}
}
Source:stackexchange.com