Skip to content

Commit

Permalink
calander + packages fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
llloxim committed Oct 20, 2023
1 parent be63783 commit afecd59
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/pages/staff-hours.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -171,6 +180,7 @@ const StaffHoursPage = () => {
eventPropGetter={eventPropGetter}
events={staffHours}
localizer={localizer}
onSelectEvent={giveEvent}
views={[Views.WEEK, Views.DAY]}
selectable
scrollToTime={scrollToTime}
Expand Down

0 comments on commit afecd59

Please sign in to comment.