import { ReactNode, ReactElement, KeyboardEvent, MouseEvent, ChangeEvent } from 'react'; import { InputProps } from '../../Input'; import { TooltipCommonProps } from '../../common'; import type { SupportedWixLocales } from '@wix/design-systems-locale-utils'; import { DateStyle } from '../index'; export interface DateInputProps extends Omit { dataHook?: string; /** The selected date. */ value?: Date | string; /** Sets the locale used to format and parse the date. When not provided, the locale from `` is used, or `'en'`. */ locale?: SupportedWixLocales; /** Sets date format of locale. */ dateStyle?: DateStyle; /** Specifies whether to validate the input. */ validate?: boolean; /** Defines a callback function which is called on cases when date is validated. */ onValidate?({ format, validationType, value, }: { format?: string; validationType: 'outOfBoundsError' | 'formatError' | 'valid'; value: string; }): void; /** When provided, hovering displays a tooltip over the clear button. */ clearButtonTooltipContent?: ReactNode; /** Tooltip props for clear buttons. */ clearButtonTooltipProps?: TooltipCommonProps; /** Specifies whether focus input after clear click. */ focusOnClearClick?: boolean; onKeyDown?: (event: KeyboardEvent, date: Date | null) => void; onChange?: (arg: { dateVal: Date; }) => void; /** Called when the clear button is used or the typed value is deleted. */ onClear?: (event: MouseEvent | KeyboardEvent | ChangeEvent) => void; onBlur?: (arg?: undefined) => void; /** * Specifies whether past dates should show validation error. Validate prop * must be true to use this feature. */ excludePastDates?: boolean; customInput?: ReactElement; } //# sourceMappingURL=DateInput.types.d.ts.map