You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When trying to change the mode of the DatePicker while it is opened the behaviour of the DatePicker breaks.
I'm trying to add an 'exclude' mode to my DatePicker. Normally it works in 'range' mode. I want the DatePicker to be able to switch to 'multi-dates' mode while the DatePicker is open. This way I could simulate a sort of exclude mode.
When switching the mode from 'range' to 'multi-dates' the selected date range will switch to the first and last date of the range. Logically, something I can fix. However when selecting a date it will now select an 'invalid date' and show today being selected in the picker.
When switching the mode from 'multi-dates' to 'range' you can't select a date.
When switching modes, but in between closing and opening the DatePicker, the behaviour is normal.
To Reproduce const isRangeMode = ref(false) :range="isRangeMode" :multi-dates="!isRangeMode"
Expected behavior
Being able to select dates or a range after switching modes, while keeping the menu open.
Tested on vue-datepicker v8.5.1
@Jasenkoo Besides my solution (switching DatePicker modes on the fly), maybe you have a different idea for me on how to implement an 'exclude days from selection' mode, when already having a range of dates selected. This is what I'm trying to achieve:
The text was updated successfully, but these errors were encountered:
Describe the bug
When trying to change the mode of the DatePicker while it is opened the behaviour of the DatePicker breaks.
I'm trying to add an 'exclude' mode to my DatePicker. Normally it works in 'range' mode. I want the DatePicker to be able to switch to 'multi-dates' mode while the DatePicker is open. This way I could simulate a sort of
exclude
mode.When switching the mode from 'range' to 'multi-dates' the selected date range will switch to the first and last date of the range. Logically, something I can fix. However when selecting a date it will now select an 'invalid date' and show today being selected in the picker.
When switching the mode from 'multi-dates' to 'range' you can't select a date.
When switching modes, but in between closing and opening the DatePicker, the behaviour is normal.
To Reproduce
const isRangeMode = ref(false)
:range="isRangeMode"
:multi-dates="!isRangeMode"
Basic example
https://stackblitz.com/edit/vuepic-vue-datepicker-e4zhgw?file=src%2Fcomponents%2FPlayground.vue
Expected behavior
Being able to select dates or a range after switching modes, while keeping the menu open.
Tested on vue-datepicker v8.5.1
@Jasenkoo Besides my solution (switching DatePicker modes on the fly), maybe you have a different idea for me on how to implement an 'exclude days from selection' mode, when already having a range of dates selected. This is what I'm trying to achieve:

The text was updated successfully, but these errors were encountered: