I'm using quasar's q-date component in my project. I want to disable weekends and past days while using it. I use the momenten business day library for this, but the moment return an object and q-date cannot detect it. how do you think i can solve this problem
HTML(lang=>pug)
q-date(v-model="userInfo.date" mask="YYYY-MM-DD" :options="getAvailableDate" first-day-of-week="1")
SCRIPT
getAvailableDate(d) {
const day = moment(d).format('DD/MM/YYYY')
console.log(moment(day, 'DD/MM/YYYY').monthBusinessDays())
return moment(day, 'DD/MM/YYYY').monthBusinessDays() && d >= date.formatDate(Date.now(), 'YYYY/MM/DD')
},
You could try passing the date to the function:
:options="getAvailableDate(userInfo.date)"
You could test by just returning true or false to check if there is an issue elswhere.
More info on use of v-bind: Vue doumentation Simple explanation