1 | import { DayPickerProps, LocaleUtils } from "react-day-picker";
|
2 | import { TimePickerProps, TimePrecision } from "./timePicker";
|
3 | /**
|
4 | * Collection of functions that determine which modifier classes get applied to which days.
|
5 | * See the [**react-day-picker** documentation](http://react-day-picker.js.org/api/ModifiersUtils) to learn more.
|
6 | *
|
7 | * @deprecated use DatePickerModifiers
|
8 | */
|
9 | export interface IDatePickerModifiers {
|
10 | [name: string]: (date: Date) => boolean;
|
11 | }
|
12 | export declare type DatePickerModifiers = IDatePickerModifiers;
|
13 | export interface IDatePickerBaseProps {
|
14 | /**
|
15 | * Props to pass to ReactDayPicker. See API documentation
|
16 | * [here](http://react-day-picker.js.org/api/DayPicker).
|
17 | *
|
18 | * The following props are managed by the component and cannot be configured:
|
19 | * `canChangeMonth`, `captionElement`, `fromMonth` (use `minDate`), `month` (use
|
20 | * `initialMonth`), `toMonth` (use `maxDate`).
|
21 | *
|
22 | * In case of supplying your owner `renderDay` function, make sure to apply the appropriate
|
23 | * CSS wrapper class to obtain default Blueprint styling.
|
24 | * eg.
|
25 | * `<div className={Classes.DATEPICKER_DAY_WRAPPER}>{CONTENT_HERE}</div>`
|
26 | *
|
27 | */
|
28 | dayPickerProps?: DayPickerProps;
|
29 | /**
|
30 | * Whether the current day should be highlighted in the calendar.
|
31 | *
|
32 | * @default false
|
33 | */
|
34 | highlightCurrentDay?: boolean;
|
35 | /**
|
36 | * The initial month the calendar displays.
|
37 | */
|
38 | initialMonth?: Date;
|
39 | /**
|
40 | * The locale name, which is passed to the functions in `localeUtils`
|
41 | * (and `formatDate` and `parseDate` if supported).
|
42 | */
|
43 | locale?: string;
|
44 | /**
|
45 | * Collection of functions that provide internationalization support.
|
46 | */
|
47 | localeUtils?: typeof LocaleUtils;
|
48 | /**
|
49 | * The latest date the user can select.
|
50 | *
|
51 | * @default 6 months from now.
|
52 | */
|
53 | maxDate?: Date;
|
54 | /**
|
55 | * The earliest date the user can select.
|
56 | *
|
57 | * @default Jan. 1st, 20 years in the past.
|
58 | */
|
59 | minDate?: Date;
|
60 | /**
|
61 | * Collection of functions that determine which modifier classes get applied to which days.
|
62 | * Each function should accept a `Date` and return a boolean.
|
63 | * See the [**react-day-picker** documentation](http://react-day-picker.js.org/api/ModifiersUtils) to learn more.
|
64 | */
|
65 | modifiers?: DatePickerModifiers;
|
66 | /**
|
67 | * If `true`, the month menu will appear to the left of the year menu.
|
68 | * Otherwise, the month menu will apear to the right of the year menu.
|
69 | *
|
70 | * @default false
|
71 | */
|
72 | reverseMonthAndYearMenus?: boolean;
|
73 | /**
|
74 | * The precision of time selection that accompanies the calendar. Passing a
|
75 | * `TimePrecision` value (or providing `timePickerProps`) shows a
|
76 | * `TimePicker` below the calendar. Time is preserved across date changes.
|
77 | *
|
78 | * This is shorthand for `timePickerProps.precision` and is a quick way to
|
79 | * enable time selection.
|
80 | */
|
81 | timePrecision?: TimePrecision;
|
82 | /**
|
83 | * Further configure the `TimePicker` that appears beneath the calendar.
|
84 | * `onChange` and `value` are ignored in favor of the corresponding
|
85 | * top-level props on this component.
|
86 | *
|
87 | * Passing any non-empty object to this prop will cause the `TimePicker` to appear.
|
88 | */
|
89 | timePickerProps?: TimePickerProps;
|
90 | }
|
91 | export declare const DISABLED_MODIFIER = "disabled";
|
92 | export declare const HOVERED_RANGE_MODIFIER = "hovered-range";
|
93 | export declare const OUTSIDE_MODIFIER = "outside";
|
94 | export declare const SELECTED_MODIFIER = "selected";
|
95 | export declare const SELECTED_RANGE_MODIFIER = "selected-range";
|
96 | export declare const DISALLOWED_MODIFIERS: string[];
|
97 | export declare function getDefaultMaxDate(): Date;
|
98 | export declare function getDefaultMinDate(): Date;
|
99 | export declare function combineModifiers(baseModifiers: DatePickerModifiers, userModifiers: DatePickerModifiers): IDatePickerModifiers;
|