kenhyuwa / vue-tailwind-picker

:tada: Datepicker component for vue.js build with Tailwind CSS & dayjs date library
https://vue-tailwind-picker.netlify.app/
193 stars 38 forks source link

Cannot select previous dates #19

Closed dansku closed 3 years ago

dansku commented 3 years ago

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

dansku commented 3 years ago

Actually figure it out!

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

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

Cheers

vanderb commented 3 years ago

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)