From afecd590ff313baf0066a80a549ed891fe813499 Mon Sep 17 00:00:00 2001 From: llloxim Date: Fri, 20 Oct 2023 14:28:52 -0700 Subject: [PATCH] calander + packages fixed --- src/pages/staff-hours.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pages/staff-hours.tsx b/src/pages/staff-hours.tsx index 617cc97..d229449 100644 --- a/src/pages/staff-hours.tsx +++ b/src/pages/staff-hours.tsx @@ -33,6 +33,15 @@ function mapDays(weekDay: string) { return 7 } } +function giveEvent(event: Event) { + window.alert( + event.title?.toString() + + "\n" + + event.start?.toString() + + " - " + + event.end?.toString(), + ) +} function parseTime(time: string) { const hour = time.match(/\d+/g) @@ -171,6 +180,7 @@ const StaffHoursPage = () => { eventPropGetter={eventPropGetter} events={staffHours} localizer={localizer} + onSelectEvent={giveEvent} views={[Views.WEEK, Views.DAY]} selectable scrollToTime={scrollToTime}