1 | import React from 'react';
|
2 | export declare enum Weekday {
|
3 | Sunday = 0,
|
4 | Monday = 1,
|
5 | Tuesday = 2,
|
6 | Wednesday = 3,
|
7 | Thursday = 4,
|
8 | Friday = 5,
|
9 | Saturday = 6
|
10 | }
|
11 | export interface CalendarFormat {
|
12 |
|
13 | monthFormat?: (date: Date) => React.ReactNode;
|
14 |
|
15 | weekdayFormat?: (date: Date) => React.ReactNode;
|
16 |
|
17 | longWeekdayFormat?: (date: Date) => React.ReactNode;
|
18 |
|
19 | dayFormat?: (date: Date) => React.ReactNode;
|
20 |
|
21 | locale?: string;
|
22 |
|
23 | weekStart?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | Weekday;
|
24 |
|
25 | rangeStart?: Date;
|
26 |
|
27 | prevMonthAriaLabel?: string;
|
28 |
|
29 | nextMonthAriaLabel?: string;
|
30 |
|
31 | yearInputAriaLabel?: string;
|
32 |
|
33 | cellAriaLabel?: (date: Date) => string;
|
34 | }
|
35 | export interface CalendarProps extends CalendarFormat, Omit<React.HTMLProps<HTMLDivElement>, 'onChange'> {
|
36 |
|
37 | date?: Date;
|
38 |
|
39 | onChange?: (date: Date) => void;
|
40 |
|
41 | validators?: ((date: Date) => boolean)[];
|
42 | /** Classname to add to outer div */
|
43 | className?: string;
|
44 | /** @hide Internal prop to allow pressing escape in select menu to not close popover */
|
45 | onSelectToggle?: (open: boolean) => void;
|
46 | }
|
47 | export declare const isValidDate: (date: Date) => boolean;
|
48 | export declare const CalendarMonth: ({ date: dateProp, locale, monthFormat, weekdayFormat, longWeekdayFormat, dayFormat, weekStart, onChange, validators, className, onSelectToggle, rangeStart, prevMonthAriaLabel, nextMonthAriaLabel, yearInputAriaLabel, cellAriaLabel, ...props }: CalendarProps) => JSX.Element;
|
49 |
|
\ | No newline at end of file |