i am using q-date component in my quasar project. My purpose of use is to have the user select only the days that are enabled and I want to show the other days as disabled. I wrote it with pug by the way
q-input.q-ma-md(readonly clearable v-model="options.date" dense outlined)
template(v-slot:prepend)
q-icon.cursor-pointer(name="event")
q-popup-proxy(transition-show="scale" transition-hide="scale")
q-date(v-model="options.date" :options="dataActiveOrNot" mask="YYYY-MM-DD")
data() {
return {
options: [
{
id: 1,
title: 'Event 1',
time: '10:00',
details: 'This is a test event',
date: '2022-06-03',
type: 'active'
},
{
id: 2,
title: 'Event 2',
time: '11:00',
details: 'This is a test event',
date: '2019-10-01',
type: 'closed'
},
{
id: 3,
title: 'Event 3',
time: '12:00',
details: 'This is a test event',
date: '2019-10-01',
type: 'active'
},
{
id: 4,
title: 'Event 4',
time: '13:00',
details: 'This is a test event',
date: '2019-10-01',
type: 'active'
},
{
id: 10,
title: 'Event 10',
time: '19:00',
details: 'This is a test event',
date: '2019-10-01',
type: 'active'
}
],
}
methods: {
dataActiveOrNot() {
for (let i = 0; i < options.length; i++) {
console.log(options[i].date)
if (options[i].type == 'active') {
return options[i].date
}
}
},
I can't find where I am doing wrong, can you help? your answers will be rewarded