mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
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:
parent
36ccaa4cff
commit
24365fb865
@ -102,9 +102,8 @@ const Calendar = ({ onChange, calendarRef, close, dateRange, children }) => {
|
|||||||
...prev,
|
...prev,
|
||||||
selectedDay: todayTimestamp,
|
selectedDay: todayTimestamp,
|
||||||
monthDetails: getMonthDetails(year, month),
|
monthDetails: getMonthDetails(year, month),
|
||||||
timeRange: { ...dateRange },
|
|
||||||
}));
|
}));
|
||||||
}, [year, month, getMonthDetails, dateRange]);
|
}, [year, month, getMonthDetails]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// add refs for keyboard navigation
|
// add refs for keyboard navigation
|
||||||
|
Loading…
Reference in New Issue
Block a user