Skip to content

Commit

Permalink
fixed issues
Browse files Browse the repository at this point in the history
  • Loading branch information
amykapernick committed Jul 31, 2024
1 parent d689c11 commit f4308ea
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/components/calendarView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,10 @@ const CustomWeekView = (props: CustomViewProps) =>
return date
}
}

type CustomViewTitleProps = [
Date,
{
localizer: DateLocalizer
}
]

CustomWeekView.title = (...props: CustomViewTitleProps) =>
CustomWeekView.title = (date, { localizer }) =>
{
const [ date, { localizer } ] = props
const [start, ...rest] = CustomWeekView.range(date, { localizer }) as Date[]
const [start, ...rest] = CustomWeekView.range(date, { localizer })

return localizer.format({ start, end: rest.pop() }, 'dayRangeHeaderFormat')
}
Expand Down

0 comments on commit f4308ea

Please sign in to comment.