-
Couldn't load subscription status.
- Fork 1.6k
Description
Describe the bug
The datepicker throws an exception since version v4.x when you switch from selectionMode "range" to "single".
With version 3.3.9 the provided stackblitz work.
Pull Request Link
No response
Reason for not contributing a PR
- Lack of time
- Unsure how to implement the fix/feature
- Difficulty understanding the codebase
- Other
Other Reason
No response
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-cnatytb4?file=src%2FApp.vue,package.json
Environment
Ubuntu 24.04.3 LTS
Firefox, Chrome...
PrimeVue since version 4.4.x
Vue version
3.5.22
PrimeVue version
4.4.x
Node version
v22.20.0
Browser(s)
No response
Steps to reproduce the behavior
Scenario 1 (Exception happen):
1: Click in the datepicker filed and chose a daterange
2: open the debugger console
3: click the button "change selection mode"
4: there's thrown an exception in the console
5: click on the datepicker input. The datepicker don't work anymore because the unhandled exception
Scenario 2 (No exception happen):
1: click directly the button "change selection mode"
2: no exception is thrown in the console
3: click on the datepicker input. The datepicker does work an the datepicker is in single mode
Expected behavior
- Theres no exception thrown
- the datepicker is in single mode
- the visible date is the new single date