Primevue DatePicker DisabledDates doesn't work when in monthly view mode #7270
Labels
Resolution: Needs Upvote 👍
Support this idea or feature by adding an upvote. Community feedback helps with prioritization.
Type: New Feature
Issue contains a new feature or new component request
Describe the bug
When using the primevue datepicker in monthly view mode, I want certain months to not be able to be selected. Using the disabledDates prop does nothing for disabling invalid months by the calendar popup and the user can still select invalid dates for the month picker.
It is inconsistent because the user is blocked from typing in an invalid date, but not for selecting the date in the calendar popup.
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/3mrnf6a8?file=src%2FApp.vue
Environment
Its just the environment made from copying one of the date picker stack blitz pages.
Vue version
3.2.45
PrimeVue version
4.2.5
Node version
No response
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
I expect the month of February to be disabled because of 2 reasons:
Also, if the user manually types in '02/01/2025', it gets cleared out as expected. The user can still choose the date in the datepicker by opening the calendar popup.
If you get rid of the 'view=month' prop on the datepicker, you can see that every date in February is disabled so the user can't choose any date in February at all. With the 'view=month' prop, it doesn't work the same way.
The text was updated successfully, but these errors were encountered: