Skip to content

Commit

Permalink
fix: #59 the event is displayed incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
howljs committed Mar 28, 2023
1 parent 9a6209e commit aa6ac0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const groupEventsByDate = (
const endEvent = moment.tz(event.end, tzOffset).startOf('d');
const diffDays = endEvent.diff(startEvent, 'd');
for (let i = 0; i <= diffDays; i++) {
const dateStr = startEvent.add(i, 'd').format('YYYY-MM-DD');
const dateStr = startEvent.clone().add(i, 'd').format('YYYY-MM-DD');
const prevEvents = groupedEvents[dateStr] || [];
groupedEvents[dateStr] = [...prevEvents, event];
}
Expand Down

0 comments on commit aa6ac0e

Please sign in to comment.