There is a solution in the documentation of the library () to address this issue, but it pertains to disabling upcoming dates. Can someone please assist me with disabling past dates instead? Below is the code snippet from the documentation that shows how to disable future dates:
<template>
<date-pick
v-model="date"
:isDateDisabled="isFutureDate"
></date-pick>
</template>
<script>
import DatePick from 'vue-date-pick';
export default {
components: {DatePick},
data: () => ({
date: ''
}),
methods: {
isFutureDate(date) {
const currentDate = new Date();
return date > currentDate;
}
}
};
</script>