Vuepic / vue-datepicker

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

Month picker issue in combination with "prevent-min-max-navigation" and max and min date #861

Closed NicoHof closed 2 months ago

NicoHof commented 2 months ago

Describe the bug

This may be two different bugs but can be both seen in the repro example

Steps to reproduce the behavior:

https://codesandbox.io/p/sandbox/vue3-datepicker-monthpicker-issue-forked-s8dy7v?file=%2Fsrc%2FApp.vue

  1. Open picker
  2. Use "Year back button" - Can come to year 2022. But should not be, right?
  3. Try to click (works) and then select (does not work) "May 2023"

Expected behavior

Hint The not disabled arrow button also happens if you change the start year in this example to 2024. Then you can go to 2025! (2022 disabled then though)

Desktop & mobile (please complete the following information):

Jasenkoo commented 2 months ago

Looks like the issue is only present if v-model is provided

NicoHof commented 2 months ago

@Jasenkoo I tried version 8.6.0 with your fix for the disabled navigation buttons. Works fine!

But I noticed, that the selection of a month at the beginning of the period is still an issue.

See the updated version of the code sandbox: https://codesandbox.io/p/sandbox/vue3-datepicker-monthpicker-issue-8-6-0-qfgcq5?file=%2Fsrc%2FApp.vue

Bildschirmfoto vom 2024-05-13 11-28-29 Bildschirmfoto vom 2024-05-13 11-28-21

Opened a new issue for better differentation: https://github.com/Vuepic/vue-datepicker/issues/865