Skip to content

Commit

Permalink
Release the selected event when the date is changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlho committed Apr 4, 2024
1 parent c863f9d commit 15a611d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ export const Calendars = ({

const handleChange = (selectedDate: Date) => {
allRooms.forEach((room) => {
room.calendarRef.current.getApi().gotoDate(selectedDate);
const roomApi = room.calendarRef.current.getApi();
roomApi.unselect();
setBookingTimeEvent(null);
roomApi.gotoDate(selectedDate);
});
};

Expand Down

0 comments on commit 15a611d

Please sign in to comment.