@awsui/components-react
Version:
AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A
29 lines (28 loc) • 1.19 kB
TypeScript
import { BaseComponentProps } from '../../internal/base-component';
import { DatePickerProps } from '../definitions';
import { CalendarTypes } from './definitions';
import { DateChangeHandlerNullable } from './grid';
export interface DateChangeHandler {
(detail: CalendarTypes.DateDetail): void;
}
export interface MonthChangeHandler {
(newMonth: Date): void;
}
export declare type DayIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6;
interface CalendarProps extends BaseComponentProps {
locale: string;
startOfWeek: DayIndex;
selectedDate: Date | null;
displayedDate: Date;
focusedDate?: Date | null;
isDateEnabled: DatePickerProps.IsDateEnabledFunction;
calendarHasFocus: boolean;
nextMonthLabel: string;
previousMonthLabel: string;
todayAriaLabel: string;
onChangeMonth: MonthChangeHandler;
onSelectDate: DateChangeHandler;
onFocusDate: DateChangeHandlerNullable;
}
declare const Calendar: ({ locale, startOfWeek, displayedDate, focusedDate, todayAriaLabel, calendarHasFocus, selectedDate, isDateEnabled, onChangeMonth, onSelectDate, onFocusDate, previousMonthLabel, nextMonthLabel }: CalendarProps) => JSX.Element;
export default Calendar;