Vuepic / vue-datepicker

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

Fully inactive months still can be chosen #617

Closed elizavetaKrainova closed 1 year ago

elizavetaKrainova commented 1 year ago

Describe the bug month-picker datepicker doesn't work with disabled-dates.

To Reproduce Steps to reproduce the behavior:

  1. Set the props month-picker and disabled-dates, say, to (date) => { return date < new Date(); }.
  2. Click on the datepicker to choose the month.
  3. See error

Expected behavior All previous months should be disabled. Without month-picker prop it works but only for days, not for the months.

Screenshots

Screenshot 2023-10-19 at 16 24 52 Screenshot 2023-10-19 at 16 25 18

Desktop & mobile (please complete the following information):

Jasenkoo commented 1 year ago

It is intended behavior, as disabled-dates only work on the calendar. You can use filters to disable months or years if needed.