Vuepic / vue-datepicker

Datepicker component for Vue 3
https://vue3datepicker.com
MIT License
1.43k stars 142 forks source link

prevent-min-max-navigation not working with max-date="null" and min-date="null" in combination #951

Closed NicoHof closed 3 weeks ago

NicoHof commented 1 month ago

Describe the bug The arrow navigation is not longer working once there are null values provided for both min-date and max-date (and prevent-min-max-navigation is enabled)

If one or both of them are not null everything works as expected. When both are null (which is according to the docs the default value for those props) the navigation does not react to user input at all.

  1. The buttons are not visually disabled. They appear clickable but nothing happens
  2. when min and max are null I think the intended behaviour is that there are no limitations (month and year change work, too)
  3. this can be workarounded like :prevent-min-max-navigation="!!(minDate || maxDate)" but should not be required IMO.

To Reproduce https://codesandbox.io/p/sandbox/vue3-datepicker-min-max-issue-fms5nn

Expected behavior prevent-min-max-navigation should behave the same in this case like its: ":prevent-min-max-navigation="false"

Desktop & mobile (please complete the following information):