diff --git a/components/calendar.tsx b/components/calendar.tsx index 703d322..688b480 100644 --- a/components/calendar.tsx +++ b/components/calendar.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react' import classnames from 'classnames' import useSWR from 'swr' -import moment from 'moment' +import moment, { Moment } from 'moment' import { Calendar } from 'react-calendar-component' import { dateFormatBackend } from '../helpers/date' @@ -32,16 +32,23 @@ export default function MyCalendar() {

Buchungsübersicht

) => - setDate(date) - } + onChangeMonth={(date: React.SetStateAction) => setDate(date)} date={date} - renderDay={({ day, classNames, onPickDate }) => ( + renderDay={({ + day, + classNames, + onPickDate, + }: { + day: Moment + classNames: string + onPickDate: any + }) => (