import type { LanguageType as WSRLanguageType } from 'wix-style-react-tpa'; import type { AppendTo } from '../internal/WixUiCoreComponents/components/CorePopover'; import type { TextFieldTheme } from '../TextField'; import type { TPAComponentProps } from '../../types'; import { ErrorMessageWrapperProps } from '../internal/ErrorMessageWrapper'; export type DatePickerInputLocale = WSRLanguageType; export type DatePickerInputFirstDayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6; export type DatePickerInputPopoverPlacement = 'bottom-start' | 'bottom-end' | 'bottom'; export interface DatePickerInputProps extends TPAComponentProps { /** The selected date */ value?: Date; /** Callback function called with a Date or a Range whenever the user selects a day in the calendar */ onChange(selectedDays: string | Date): void; /** A Callback function which is called whenever the user presses escape or clicks outside of the element or a date is selected and `shouldCloseOnSelect` is set */ onClose?(event: React.MouseEvent): void; /** A Callback function which is called date picker is opened. */ onOpen?(event: React.MouseEvent): void; /** placeholder of the Input */ placeholderText?: string; /** Is the DatePicker disabled */ disabled?: boolean; /** DatePicker instance locale */ locale?: DatePickerInputLocale; /** When true, past dates would be unselectable */ excludePastDates?: boolean; /** * Determines selectable dates * * `param` {Date} `date` - a date to check * * `return` {boolean} - true if `date` should be selectable, false otherwise */ filterDate?(date: Date): boolean; /** First day of the week, allowing only from 0 to 6 (Sunday to Saturday). The default value is 1 which means Monday. */ firstDayOfWeek?: DatePickerInputFirstDayOfWeek; /** Displays a selectable monthDropdown */ showMonthDropdown?: boolean; /** Displays a selectable yearDropdown */ showYearDropdown?: boolean; /** Error status */ hasError?: boolean; /** Appearance of error message. TextOnly | BackgroundAndBorder */ errorAppearance?: ErrorMessageWrapperProps['errorAppearance']; /** The error status message to display when hovering the status icon. */ errorMessage?: string; /** sets desired width of DatePicker input */ inputWidth?: number | string; /** Sets the input theme possible values: 'line', 'box'*/ inputTheme?: TextFieldTheme; /** The popover placement. Could be 'bottom-start', 'bottom-end' or 'bottom'. */ popoverPlacement?: DatePickerInputPopoverPlacement; /** Element to append the Popover to */ popoverAppendTo?: AppendTo; /** Defines a string value that labels the Date Picker element. Optional. */ 'aria-label'?: string; /** Identifies the element that labels the Date Picker element. Optional. */ 'aria-labelledby'?: string; /** Identifies the element that describes the date input element. Optional. */ dateInputAriaDescribedby?: string; /** Defines a string value that labels the date input element. Optional. */ dateInputAriaLabel?: string; /** Identifies the element that labels the date input element. Optional. */ dateInputAriaLabelledby?: string; /** Defines a string value that labels the clear button element. Optional. */ clearButtonAriaLabel?: string; /** Identifies the element that labels the clear button element. Optional. */ clearButtonAriaLabelledby?: string; /** Defines a string value that labels the left arrow in calendar header */ leftArrowAriaLabel?: string; /** Identifies the element that labels the left arrow in calendar header */ leftArrowAriaLabelledBy?: string; /** Defines a string value that labels the right arrow in calendar header */ rightArrowAriaLabel?: string; /** Identifies the element that labels the right arrow in calendar header */ rightArrowAriaLabelledBy?: string; /** Defines a string value that labels the months dropdown in calendar header */ monthDropdownAriaLabel?: string; /** Identifies the element that labels the months dropdown in calendar header */ monthDropdownAriaLabelledBy?: string; /** Defines a string value that labels the years dropdown in calendar header */ yearDropdownAriaLabel?: string; /** Identifies the element that labels the years dropdown in calendar header */ yearDropdownAriaLabelledBy?: string; /** Defines a string value that labels the calendar button element. Optional. */ suffixButtonAriaLabel?: string; /** Identifies the element that labels the calendar button element. Optional. */ suffixButtonAriaLabelledby?: string; /** Specifies whether to apply the new design and behavior of error messages */ newErrorMessage?: boolean; /** Label that appears on top of the input. */ label?: string; /** Should display clear button. */ removeClearButton?: boolean; /** Popover z-index. */ zIndex?: number; /** * @deprecated do not use, it will be removed in the future, calendar must be opened by explicit user action like clicking a button or pressing (alt+) arrow down key * Open calendar on input focus event or on any key down event in input keeping focus on input, will still open calendar on input click event **/ autoOpen?: boolean; /** Turn on combo pattern on input (i.e. make input editable, otherwise it is readonly) */ isCombobox?: boolean; } //# sourceMappingURL=types.d.ts.map