Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

preventMinMaxNavigation disables previous and next nav arrow with only max OR min defined #99

Closed
TheVaan opened this issue Feb 15, 2022 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@TheVaan
Copy link

TheVaan commented Feb 15, 2022

Describe the bug
The new preventMinMaxNavigation disables the previous AND next navigation arrow even if there is only max OR min defined.
Switching to the previous month/year by clicking on the month/year is working, but the previous navigation arrow is disabled.
Further, it's not possible to navigate to the next month via next arrow when switching to a previous month over the month selection.

To Reproduce
Visit https://codesandbox.io/s/vue3-date-time-picker-preventminmaxnavigation-9wk2x?file=/src/components/Demo.vue

<Datepicker
  range
  v-model="dateRange"
  :preventMinMaxNavigation="true"
  :maxDate="new Date()"
/>

Now try to click on <.
Switch month with the month selector. Now try to navigate forth by clicking on >.

Expected behavior
It should be possible to navigate forth when only minDate is defined and to navigate back when only maxDate is defined.
Further it should be possible to navigate forth and back, when current month is not maxDate.month.

@Jasenkoo Jasenkoo added the bug Something isn't working label Feb 15, 2022
@Jasenkoo Jasenkoo added this to the v2.7.0 milestone Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants