Skip to content
This repository was archived by the owner on Apr 17, 2022. It is now read-only.

Commit 513c4e7

Browse files
committed
fix: Duplicate month in two-calendars-solo
1 parent c6e1ae6 commit 513c4e7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Vue3DatePicker/components/composition/calendar.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,10 @@ export const useCalendar = (props: UseCalendar, emit: VueEmit): IUseCalendar =>
326326
monthNext.value = date.month;
327327
yearNext.value = date.year;
328328
} else {
329-
monthNext.value = getDateMonth(date);
330-
yearNext.value = getDateYear(date);
329+
if (getDateMonth(modelValue.value[0]) !== getDateMonth(modelValue.value[1])) {
330+
monthNext.value = getDateMonth(date);
331+
yearNext.value = getDateYear(date);
332+
}
331333
}
332334
}
333335
};

0 commit comments

Comments
 (0)