Skip to content

Commit

Permalink
fix: multi-calendars solo next calendar keeps resetting month on …
Browse files Browse the repository at this point in the history
…range picker (fixes #1025)
  • Loading branch information
Jasenkoo committed Nov 2, 2024
1 parent 4111e49 commit cf34d5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/VueDatePicker/components/DatePicker/date-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ export const useDatePicker = (
}
if (
defaultedMultiCalendars.value.count &&
(!defaultedMultiCalendars.value.solo || !modelValue.value || shouldAssignMultiSolo())
(!modelValue.value || shouldAssignMultiSolo()) &&
(fromMount ? true : !defaultedMultiCalendars.value.solo)
) {
for (let i = 1; i < defaultedMultiCalendars.value.count; i++) {
const prevDate = set(getDate(), { month: month.value(i - 1), year: year.value(i - 1) });
Expand Down

0 comments on commit cf34d5f

Please sign in to comment.