From e978ce16df77c20e78249a92efeb1ffc8e7f9dea Mon Sep 17 00:00:00 2001 From: Kiril Volskyi <118115736+KirilCycle@users.noreply.github.com> Date: Sat, 8 Jun 2024 01:42:38 +0300 Subject: [PATCH] Fix #6737 Calendar month navigator (#6739) * fix: use new Date instead of cloned date * fix: reset the day of the cloned date --- components/lib/calendar/Calendar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/components/lib/calendar/Calendar.js b/components/lib/calendar/Calendar.js index 56fbc83638..27d78d2226 100644 --- a/components/lib/calendar/Calendar.js +++ b/components/lib/calendar/Calendar.js @@ -480,6 +480,7 @@ export const Calendar = React.memo( const currentViewDate = getViewDate(); let newViewDate = cloneDate(currentViewDate); + newViewDate.setDate(1); newViewDate.setMonth(parseInt(value, 10)); updateViewDate(event, newViewDate);