UNPKG

react-full-year-scheduler-single-file

Version:

React Year Scheduler is a customizable and easy-to-use React component that allows you to display a year calendar with events, and enable users to select and interact with them.

41 lines (40 loc) 921 B
import { Dayjs } from 'dayjs'; export type TEvent = { startDate: Dayjs; endDate: Dayjs; eventName: string; eventBgColor?: string; eventTextColor?: string; }; export type TDay = { date: Dayjs; eventIndex?: number | undefined; eventName?: string | undefined; eventBgColor?: string | undefined; eventTextColor?: string; }; export type TDayCell = { isEmpty?: never; date?: Dayjs; dayNumber: number; weekDayIndex: number; rowCellIndex: number; dayName: string; isWeekend?: boolean; eventIndex?: number; eventName?: string; eventBgColor?: string; eventTextColor?: string; } | { isEmpty: boolean; date?: never; dayNumber: number; weekDayIndex?: number; rowCellIndex: number; dayName?: string; isWeekend?: never; eventIndex?: never; eventName?: never; eventBgColor?: never; eventTextColor?: never; };