Try to fix missing events again
This commit is contained in:
parent
f692616d2c
commit
cbe2913f2d
@ -82,13 +82,18 @@ export default function () {
|
|||||||
return (
|
return (
|
||||||
<Container maxW="container.lg" h="600px">
|
<Container maxW="container.lg" h="600px">
|
||||||
<Calendar
|
<Calendar
|
||||||
endAccessor={(event) => new Date(event.end)}
|
events={data?.calendarData.map((event) => {
|
||||||
events={data?.calendarData}
|
// @ts-expect-error
|
||||||
|
event.end = new Date(event.end);
|
||||||
|
// @ts-expect-error
|
||||||
|
event.start = new Date(event.start);
|
||||||
|
|
||||||
|
return event;
|
||||||
|
})}
|
||||||
localizer={dayjsLocalizer(dayjs)}
|
localizer={dayjsLocalizer(dayjs)}
|
||||||
onSelectSlot={(s) => {
|
onSelectSlot={(s) => {
|
||||||
setDate(s.slots.at(0) as Date);
|
setDate(s.slots.at(0) as Date);
|
||||||
}}
|
}}
|
||||||
startAccessor={(event) => new Date(event.start)}
|
|
||||||
style={{ height: 500 }}
|
style={{ height: 500 }}
|
||||||
/>
|
/>
|
||||||
<Accordion id="events-accordion" mt="16px">
|
<Accordion id="events-accordion" mt="16px">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user