/** * calendar.ts * * Type definitions for the calendar component. * Used by both Elements and React calendar implementations * and by the shared calendar helper functions. */ export interface IDateConstraints { earliest: string | null; latest: string | null; excludedates: Date[]; excludeweekdays: string[]; } export interface ICalendarGridDimensions { firstDayOfMonth: Date; lastDayOfMonth: Date; startingDay: number; numDays: number; numRows: number; numDaysPrevMonth: number; initialWeek: number; } export interface IGridCellPosition { rowIndex: number; colIndex: number; } export type TDateRangeMap = { [key: string]: boolean; }; export interface ISelectionState { selected: string[]; _selected: Date[]; inRange: TDateRangeMap; } export interface ISelectionOptions { multiple: boolean; maxMultiple: number; range: boolean; excludedates: Date[]; excludeweekdays: string[]; }