import React from "react"; import { TextboxProps } from "../textbox"; import { PickerProps } from "./__internal__/date-picker"; import { InputName } from "../date-range/__internal__/date-range.context"; export interface DateChangeEvent { target: { id?: string; name?: string; value: { formattedValue: string; rawValue: string | null; }; }; } export interface DateInputProps extends Omit { /** Boolean to allow the input to have an empty value */ allowEmptyValue?: boolean; /** Boolean to toggle where DatePicker is rendered in relation to the Date Input */ disablePortal?: boolean; /** Minimum possible date YYYY-MM-DD */ minDate?: string; /** Maximum possible date YYYY-MM-DD */ maxDate?: string; /** Specify a callback triggered on change */ onChange: (ev: DateChangeEvent) => void; /** Specify a callback triggered on blur */ onBlur?: (ev: DateChangeEvent) => void; /** The current date string */ value: string; /** * Pass any props that match the DayPickerProps interface to override default behaviors * See [DayPickerProps](https://daypicker.dev/api/type-aliases/DayPickerProps) for a full list of available props * */ pickerProps?: PickerProps; /** * @private * @ignore * Name passed from DateRange to allow it to know which input is updating * */ inputName?: InputName; /** Callback triggered when the picker is opened */ onPickerOpen?: () => void; /** Callback triggered when the picker is closed */ onPickerClose?: () => void; /** Date format string to be applied to the date inputs */ dateFormatOverride?: string; /** * @deprecated The dialog label is now always derived from the locale (`date.ariaLabels.chooseDate`). * Remove this prop; it has no effect. */ datePickerAriaLabel?: string; /** * @deprecated The dialog label is now always derived from the locale (`date.ariaLabels.chooseDate`). * Remove this prop; it has no effect. */ datePickerAriaLabelledBy?: string; /** Date input presentation. Typical is the default; legacy retains its icon trigger. */ variant?: "legacy" | "typical"; /** * Number of years shown either side of the bounds (`minDate`/`maxDate`, or * `pickerProps.startMonth`/`endMonth`) or the anchor year in the year * selector dropdown. Defaults to 10. */ yearRangeOffset?: number; } export declare const DateInput: React.ForwardRefExoticComponent>; export default DateInput;