kenhyuwa/vue-tailwind-picker

Cannot select previous dates

Closed this issue · 2 comments

I know there is a closed issue on this, but I cannot still get it to work,

For what I can see, I also can't select any date before the current one.
It says it's fixed, I just can't find a way get it working. Any examples on this?
Thank you

Actually figure it out!

<VueTailwindPicker :start-date="startDate" :init="false" @change="(v) => checkin = v">...

Then on data() => startDate: dayjs().format('2018-01-01')

Cheers

The "solution" ends in the state, that your datepicker is set to 2018. So the user e.g. has to manually click e.g. to last month.
I've looked in the files and found the dateRange property. Think that is exactly what you searched.

<VueTailwindPicker :date-range="true" @change="(v) => checkin = v">...

Now previous dates are selectable without reset the default visible date-set (today)