Skip to content

Commit

Permalink
Merge pull request #159 from ITPNYU/feature/remove_selected_event_whe…
Browse files Browse the repository at this point in the history
…n_user_change_date

Release the selected event when the date is changed.
  • Loading branch information
rlho authored Apr 4, 2024
2 parents b191c3b + 15a611d commit d151e36
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 d151e36

Please sign in to comment.