import { default as React } from 'react'; import { DatePickerProps as RACDatePickerProps } from 'react-aria-components'; import { CalendarDate } from '@internationalized/date'; import { SafeExtract, Size } from '../../../../types'; import { PlaceholderProps } from '../../types'; type RACProps = Pick, 'shouldForceLeadingZeros' | 'autoFocus' | 'onFocus' | 'onBlur' | 'onKeyDown' | 'onKeyUp' | 'onOpenChange' | 'isOpen' | 'onOpenChange' | 'defaultOpen' | 'shouldCloseOnSelect' | 'isDateUnavailable' | 'name' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-details'>; export interface DateInputContainerProps extends React.PropsWithChildren, RACProps, PlaceholderProps { /** * The id of the input. If not provided, a unique id will be generated. */ id?: string; /** * The value of the input in ISO 8601 format (f.e. '2024-12-31'). */ value?: string | null; /** * The default value of the input in ISO 8601 format (f.e. '2024-12-31') (uncontrolled). */ defaultValue?: string | null; /** * Callback fired when the value changes. * @param value The new value in ISO 8601 format (f.e. '2024-12-31'). If the value is invalid, it will be `null`. */ onChange?: (value: string | null) => void; /** * Whether the input is disabled. */ disabled?: boolean; /** * Whether the input is required. */ required?: boolean; /** * Whether the input is read-only. */ readOnly?: boolean; /** * Whether the date should force leading zeros in the month and day segments. */ shouldForceLeadingZeros?: RACProps['shouldForceLeadingZeros']; /** * Whether the input should be focused when the page loads. */ autoFocus?: RACProps['autoFocus']; /** * Callback fired when the input is focused. */ onFocus?: RACProps['onFocus']; /** * Callback fired when the input is blurred. */ onBlur?: RACProps['onBlur']; /** * Callback fired when a key is pressed. */ onKeyDown?: RACProps['onKeyDown']; /** * Callback fired when a key is released. */ onKeyUp?: RACProps['onKeyUp']; /** * Callback fired when the calendar is opened or closed. */ onOpenChange?: RACProps['onOpenChange']; /** * Whether the calendar is open. */ isOpen?: RACProps['isOpen']; /** * Whether the calendar should be open by default. */ defaultOpen?: RACProps['defaultOpen']; /** * Whether the calendar should close when a date is selected. */ shouldCloseOnSelect?: RACProps['shouldCloseOnSelect']; /** * The minimum allowed date in ISO 8601 format. */ min?: string | number | undefined; /** * The maximum allowed date in ISO 8601 format. */ max?: string | number | undefined; /** * A unique name for the input. */ name?: RACProps['name']; /** * Width of the input. */ width?: SafeExtract; } export declare const DateInputContainer: React.FC; export {};