Closed wokung closed 2 years ago
can you provide code-snippet or sandbox link to replicate the same issue
you can see it here
https://vuejs3-datepicker.netlify.app/
at the "Disabled" example.
When you open the Datepicker, it opens the 2022 February view. You need to go way back before you can choose a date.
Would be better if it opens automatically on the last available date.
setting the property "open-date" does nothing.
`<datepicker placeholder="to" :minimum-view="'year'" :maximum-view="'year'" name="dateTo" @changedYear="handleChangedYear" :prevent-disable-date-selection="true" :disabled-dates="{ from: ((date) => date.setFullYear(date.getFullYear() - 30) && date)(new Date()) }"
`
vs
`<datepicker placeholder="to" :minimum-view="'year'" :maximum-view="'year'" name="dateTo" @changedYear="handleChangedYear" :prevent-disable-date-selection="true" :open-date="new Date(1991, 1, 1)" :disabled-dates="{ from: ((date) => date.setFullYear(date.getFullYear() - 30) && date)(new Date()) }"
`
I made a codesandbox:
https://codesandbox.io/s/vue3-example-forked-8r57v
you can see that if you change or remove open-date, it changes nothing.
please check this out : https://codesandbox.io/s/vue3-example-forked-vum1t
Hi,
this is not the desired functionality for open-date. I don't want to set a value initially. It should be able to stay empty. The same behavior here, I already could get with setting the property "value".
It should behave like this:
https://codesandbox.io/s/vue-datepicker-demo-forked-v9b2s?file=/components/Demo.vue
See the first example. The datepicker is initially empty, but if I open it, it starts on 1991.
Hi,
this is not the desired functionality for open-date. I don't want to set a value initially. It should be able to stay empty. The same behavior here, I already could get with setting the property "value".
It should behave like this:
https://codesandbox.io/s/vue-datepicker-demo-forked-v9b2s?file=/components/Demo.vue
See the first example. The datepicker is initially empty, but if I open it, it starts on 1991.
Thanks
Hey, I have a simple year datepicker with disabled years in the present.
So whenever I open the datepicker, it opens with year 2022 (but disabled). Now I have to press the arrows some time, till I arrive at not disabled years.
Can you please fix that?