3👍
✅
One obvious solution is to check the day of week before pushing the date to available dates:
if (moment(date).day() !== 0)
availableDates.push(date)
1👍
I would just do simple check which day it is with either dayjs
or moment
allowedDates(val) {
return dayjs(val).day() !== 0;
},
0👍
Vue Datepicker have a build in filter to filter out or disable specific week day
0 bein Sunday
6 being Saturday
<template>
<VueDatePicker v-model="date" :disabled-week-days="[6, 0]" />
</template>
Source:stackexchange.com