Vuepic / vue3-date-time-picker

Datepicker component for Vue 3
https://vue3datepicker.com
MIT License
158 stars 13 forks source link

prevent month navigation outside minDate/maxDate #94

Closed gerritvanaaken closed 2 years ago

gerritvanaaken commented 2 years ago

Users are able to navigate to a month that is in the past (or before the defined minDate of the date picker). That confuses them potentially.

I would like an option that prevents displaying the month view outside the defined minDate and maxDate of this datepicker instance!

Jasenkoo commented 2 years ago

I am aware of this issue, it will be fixed in the next version

gerritvanaaken commented 2 years ago

Can’t wait for 2.6.0 ;-)

gerritvanaaken commented 2 years ago

Thanks for adding this feature. Two remarks, though:

  1. Shouldn’t it be sufficient if one of the two props "minDate" or "maxDate" is given? Currently, both are needed, so I would have to set some fantasy date in the future as "maxDate".
  2. In my quick test, I have set "minDate" to "now". I changed the month to March, but could not get back to February afterwards. Maybe something wrong with my reactivity, maybe a bug.
Jasenkoo commented 2 years ago

@gerritvanaaken

  1. Shouldn’t it be sufficient if one of the two props "minDate" or "maxDate" is given? Currently, both are needed, so I would have to set some fantasy date in the future as "maxDate"

Hmm, I will check that, it should work if only one is added

2. In my quick test, I have set "minDate" to "now". I changed the month to March, but could not get back to February afterwards. Maybe something wrong with my reactivity, maybe a bug.

There is an issue that will be fixed in the upcoming version (check #99)