From 24365fb86574e9a80fefbad03f447b88b6906292 Mon Sep 17 00:00:00 2001 From: Sergey Krashevich Date: Sat, 5 Aug 2023 13:48:14 +0300 Subject: [PATCH] bugfix: date selection in events calendar (#7374) * Refactor Calendar component to update month details only when year or month changes * Update web/src/components/Calendar.jsx Co-authored-by: Nicolas Mowen --------- Co-authored-by: Nicolas Mowen --- web/src/components/Calendar.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/src/components/Calendar.jsx b/web/src/components/Calendar.jsx index faaf5544b..bfab5d785 100644 --- a/web/src/components/Calendar.jsx +++ b/web/src/components/Calendar.jsx @@ -102,9 +102,8 @@ const Calendar = ({ onChange, calendarRef, close, dateRange, children }) => { ...prev, selectedDay: todayTimestamp, monthDetails: getMonthDetails(year, month), - timeRange: { ...dateRange }, })); - }, [year, month, getMonthDetails, dateRange]); + }, [year, month, getMonthDetails]); useEffect(() => { // add refs for keyboard navigation