Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Try to fix missing events again
  • Loading branch information
regalijan committed Nov 5, 2024
1 parent f692616 commit cbe2913
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/routes/events-calendar.tsx
Expand Up @@ -82,13 +82,18 @@ export default function () {
return (
<Container maxW="container.lg" h="600px">
<Calendar
endAccessor={(event) => new Date(event.end)}
events={data?.calendarData}
events={data?.calendarData.map((event) => {
// @ts-expect-error
event.end = new Date(event.end);
// @ts-expect-error
event.start = new Date(event.start);

return event;
})}
localizer={dayjsLocalizer(dayjs)}
onSelectSlot={(s) => {
setDate(s.slots.at(0) as Date);
}}
startAccessor={(event) => new Date(event.start)}
style={{ height: 500 }}
/>
<Accordion id="events-accordion" mt="16px">
Expand Down

0 comments on commit cbe2913

Please sign in to comment.