UNPKG

wix-style-react

Version:
59 lines 4.08 kB
export default CalendarPanel; declare class CalendarPanel extends React.Component<any, any, any> { static displayName: string; static propTypes: { /** Applies a data-hook HTML attribute that can be used in the tests */ dataHook: PropTypes.Requireable<string>; /** Specifies a CSS class name to be appended to the component’s root element */ className: PropTypes.Requireable<string>; /** Defines a callback function which is called whenever the user selects a day or a date range in the calendar */ onChange: PropTypes.Validator<(...args: any[]) => any>; /** Defines a callback function which is called whenever user press `escape` or click outside of the element */ onClose: PropTypes.Requireable<(...args: any[]) => any>; /** Specifies whether past dates should be selectable or not */ excludePastDates: PropTypes.Requireable<boolean>; /** Specifies dates that are selectable. Only the dates that match defined criteria will be available for a user to select. */ filterDate: PropTypes.Requireable<(...args: any[]) => any>; /** Defines a selected date or date range */ value: PropTypes.Requireable<NonNullable<string | Date | PropTypes.InferProps<{ from: PropTypes.Requireable<NonNullable<string | Date | null | undefined>>; to: PropTypes.Requireable<NonNullable<string | Date | null | undefined>>; }> | null | undefined>>; /** Specifies if user can select a single day or a date range */ selectionMode: PropTypes.Requireable<string>; /** Specifies whether to display a year selection dropdown inside of a calendar */ showYearDropdown: PropTypes.Requireable<boolean>; /** Specifies whether to display a month selection dropdown inside of a calendar */ showMonthDropdown: PropTypes.Requireable<boolean>; /** Specifies whether calendar should close on a day selection */ shouldCloseOnSelect: PropTypes.Requireable<boolean>; /** Specifies date picker instance locale */ locale: PropTypes.Requireable<NonNullable<"th" | "tr" | "ms" | "id" | "no" | "en" | "en-US" | "en-GB" | "en-AU" | "en-CA" | "ar" | "bg" | "ca" | "zh" | "zh-TW" | "zh-HK" | "zh-MO" | "cs" | "da" | "nl" | "fi" | "fr" | "fr-CA" | "fr-CH" | "fr-BE" | "de" | "de-CH" | "de-AT" | "el" | "he" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "nb" | "nn" | "pl" | "pt-BR" | "pt" | "ro" | "ru" | "sk" | "sl" | "es" | "es-419" | "es-AR" | "es-MX" | "es-US" | "sv" | "tl" | "uk" | "vi" | PropTypes.InferProps<{ code: PropTypes.Requireable<string>; formatDistance: PropTypes.Requireable<(...args: any[]) => any>; formatRelative: PropTypes.Requireable<(...args: any[]) => any>; localize: PropTypes.Requireable<object>; formatLong: PropTypes.Requireable<object>; match: PropTypes.Requireable<object>; options: PropTypes.Requireable<object>; }> | null | undefined>>; /** Defines a number of months to display inside of a panel */ numOfMonths: PropTypes.Requireable<number>; /** Defines an array of predefined calendar presets that are displayed as select items on the left side of a panel */ presets: PropTypes.Requireable<any[]>; /** Renders a panel footer. Pass `<CalendarPanelFooter/>` in all common cases. `({selectedDays, submitDisabled}) => void` - `selectedDays` is the same as the CalendarPanel's `value` prop. `submitDisabled` is true when the current selectedDays is not valida for submission. */ footer: PropTypes.Requireable<(...args: any[]) => any>; }; static defaultProps: { numOfMonths: number; }; constructor(props: any); constructor(props: any, context: any); onSelectPreset: (preset: any) => void; getSelectedPresetId(): any; isSubmitDisabled(): boolean; render(): React.JSX.Element; } import React from 'react'; import PropTypes from 'prop-types'; //# sourceMappingURL=CalendarPanel.d.ts.map