import "./DateRangeInput.css"; import { ComponentProps, ElementType, FocusEventHandler, ForwardedRef, SyntheticEvent } from "react"; import { InteractionStatesProps } from "../../shared"; export interface DateRangePreset { text: string; startDate: Date; endDate: Date; } export interface InnerDateRangeInputProps extends InteractionStatesProps { /** * @ignore */ name?: string; /** * A controlled start date value. */ startDate?: Date | null; /** * A controlled end date value. */ endDate?: Date | null; /** * The initial value of start date. */ defaultStartDate?: Date; /** * The initial value of end date. */ defaultEndDate?: Date; /** * Temporary text that occupies both date inputs when they are empty. */ placeholder?: string; /** * The minimum (inclusive) date. */ min?: Date; /** * The maximum (inclusive) date. */ max?: Date; /** * Whether or not a user input is required before form submission. */ required?: boolean; /** * Whether or not the input should display as "valid" or "invalid". */ validationState?: "valid" | "invalid"; /** * Called when the date(s) are / is applied. * @param {SyntheticEvent} event - React's original event. * @param {Object} startDate - Selected start date. * @param {Object} endDate - Selected end date. * @returns {void} */ onDatesChange?: (event: SyntheticEvent, startDate: Date, endDate: Date) => void; /** * @ignore */ onFocus?: FocusEventHandler; /** * @ignore */ onBlur?: FocusEventHandler; /** * Array of pre-determined dates range. */ presets?: DateRangePreset[]; /** * The presets style to use. */ presetsVariant?: "compact" | "expanded"; /** * Whether or not the input should autofocus on render. */ autoFocus?: boolean | number; /** * Whether or not the input take up the width of its container. */ fluid?: boolean; /** * An HTML element type or a custom React element type to render as. */ as?: ElementType; /** * Whether or not the input is readonly. */ readOnly?: boolean; /** * @ignore */ forwardedRef: ForwardedRef; } export declare function InnerDateRangeInput(props: InnerDateRangeInputProps): JSX.Element; export declare const DateRangeInput: import("../../shared").OrbitComponent; export declare type DateRangeInputProps = ComponentProps;