Skip to content

Commit

Permalink
#133 Added fix to flashing schedule view
Browse files Browse the repository at this point in the history
  • Loading branch information
YukiGasai committed Aug 9, 2023
1 parent 53f5909 commit d779466
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/googleApi/GoogleListEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,16 @@ function resolveMultiDayEventsHelper(
startMoment.add(1, "days").startOf("day");
}


//Limit the events to the requested time span
if (date && endDate) {
singleDayEventList = singleDayEventList.filter((event) => {
const eventStart = window.moment(event.start.dateTime);
return eventStart.isBetween(date, endDate, "day", "[]");
});
}


return [...allEvents, ...singleDayEventList];

}, []);
Expand Down

0 comments on commit d779466

Please sign in to comment.