Skip to content

Commit

Permalink
bugfix: date selection in events calendar (#7374)
Browse files Browse the repository at this point in the history
* Refactor Calendar component to update month details only when year or month changes

* Update web/src/components/Calendar.jsx

Co-authored-by: Nicolas Mowen <[email protected]>

---------

Co-authored-by: Nicolas Mowen <[email protected]>
  • Loading branch information
skrashevich and NickM-27 authored Aug 5, 2023
1 parent 36ccaa4 commit 24365fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions web/src/components/Calendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 24365fb

Please sign in to comment.