reablocks
Version:
Component library for React
79 lines (77 loc) • 1.95 kB
TypeScript
import { CalendarTheme } from '../CalendarTheme';
import { FC } from 'react';
export interface CalendarDaysProps {
/**
* The currently displayed month of the calendar.
*/
value?: Date;
/**
* The currently selected date(s).
*/
current?: Date | [Date, Date] | [Date, undefined] | [undefined, undefined] | undefined;
/**
* The currently hovered date.
*/
hover?: Date | null;
/**
* The minimum selectable date for the calendar, as a Date object.
*/
min?: Date;
/**
* The maximum selectable date for the calendar, as a Date object or the string 'now'.
*/
max?: Date | 'now';
/**
* Whether the calendar is disabled.
*/
disabled?: boolean;
/**
* Whether to display days of previous month.
*/
hidePrevMonthDays?: boolean;
/**
* Whether to display days of next month.
*/
hideNextMonthDays?: boolean;
/**
* Whether to display day of week labels.
*/
showDayOfWeek?: boolean;
/**
* Whether to highlight the today.
*/
showToday?: boolean;
/**
* Customize the labels for the days of the week.
*/
dayOfWeekLabels?: string[];
/**
* Whether the calendar is a range picker.
*/
isRange?: boolean;
/**
* Range of selected dates
*/
range?: [Date, Date] | [Date, undefined] | [undefined, undefined];
/**
* X-axis block animation
*/
xAnimation?: string | number;
/**
* Whether to animate the calendar.
*/
animated?: boolean;
/**
* A callback function that is called when a day is selected.
*/
onChange: (date: Date) => void;
/**
* A callback function that is called when a day is hovered.
*/
onHover?: (date: Date | null) => void;
/**
* Theme for the CalendarDays.
*/
theme?: CalendarTheme;
}
export declare const CalendarDays: FC<CalendarDaysProps>;