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 <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
Sergey Krashevich
2023-08-05 05:48:14 -05:00
committed by GitHub
co-authored by Nicolas Mowen
parent 36ccaa4cff
commit 24365fb865
+1 -2
View File
@@ -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