import { ReactElement, FocusEvent } from 'react'; import { IconName } from '../Icon'; import { CommonProps } from '../common'; export interface DateRangePickerProps extends Omit { /** * Specify the [automated assistance](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) in filling out form field values by the browser. */ autoComplete?: string; /** * Allow to clear value after selected dates. */ clearable?: boolean; /** * Whether the picker is disabled. */ disabled?: boolean; /** * Date format. Following date-fns's format (https://date-fns.org/v2.16.1/docs/format). */ format?: string; /** * Ids of element. */ id?: { endDate?: string; startDate?: string; }; /** * Whether the input is invalid. */ invalid?: boolean; /** * The latest date user can select. */ maxDate?: Date; /** * The earliest date user can select. */ minDate?: Date; /** * Names of element, is used to refer to the form data for submission. */ name?: { endDate?: string; startDate?: string; }; /** * onBlur event handler. */ onBlur?: (e: FocusEvent) => void; /** * onChange event handler. */ onChange?: ({ startDate, endDate, }: { endDate?: string; startDate?: string; }) => void; /** * Placeholder text in the absence of any value. */ placeholder?: { endDate: string; startDate: string; }; /** * Name of Icon or an Icon element to render on the left side of the input, before the user's cursor. */ prefix?: IconName | ReactElement; /** * The size of the input box. */ size?: 'small' | 'medium' | 'large'; /** * Current selected date which must be in correct format. If value is invalid, it will be skipped. */ value?: { endDate?: string; startDate?: string; }; } declare const DateRangePicker: ({ autoComplete, value, onBlur, onChange, minDate, maxDate, size, invalid, placeholder, prefix, disabled, clearable, format, name, id, className, style, sx, "data-test-id": dataTestId, }: DateRangePickerProps) => ReactElement; export default DateRangePicker;