import { DateTimeRangePickerProps } from './date-time-range-picker.types'; /** * DateTimeRangePicker is a composite component that allows users to select a range of dates and times. * It combines two DateTimeInput components for start and end values with a popup containing * a calendar for date selection and time selectors for precise time control. * * Built on top of React Aria's date range picker primitives with extended time support. * The component automatically handles keyboard navigation, accessibility, and * internationalization for both date and time components. * * ## Features * * - **Unified Date/Time Range Selection**: Single component for both date and time ranges * - **Dual Input Fields**: Separate inputs for start and end date/time * - **Calendar Integration**: Full calendar for date range selection * - **Time Selectors**: Dropdown selectors for hour, minute, and second * - **Granularity Control**: Configure precision from day to second level * - **Keyboard Navigation**: Full keyboard support with Enter/Space to open * - **Accessibility**: Screen reader support and proper focus management * - **Internationalization**: Automatic formatting based on locale * - **Validation**: Built-in min/max date/time validation * - **Form Integration**: Works seamlessly with HTML forms * * ## Usage * * ### Basic Usage * ```tsx * import { DateTimeRangePicker } from '@bloomreach/react-banana-ui'; * * function MyComponent() { * const [value, setValue] = useState({ * start: new Date('2024-01-01T09:00:00'), * end: new Date('2024-01-01T17:00:00') * }); * * return ( * setValue(newValue)} * granularity="minute" * /> * ); * } * ``` * * ### With Validation * ```tsx * { * if (context.valid) { * setValue(newValue); * } else { * setError(context.validationMessage.join(' ')); * } * }} * minDate={new Date('2024-01-01')} * maxDate={new Date('2024-12-31')} * granularity="second" * required * /> * ``` * * ### Different Granularities * ```tsx * // Date range only * * * // Date and hour range * * * // Date, hour, and minute range (default) * * * // Full precision with seconds * * ``` * * ## Accessibility * * The component follows WAI-ARIA guidelines for both date and time selection: * - Proper focus management between inputs, calendar, and time selectors * - Screen reader announcements for value changes * - Keyboard navigation with arrow keys in calendar * - Escape key to close, Enter/Space to open * - Support for assistive technologies * - Proper labeling and role attributes * * @param props - The props for the DateTimeRangePicker component * @param forwardedRef - Ref to be forwarded to the container element * @returns A comprehensive date and time range picker component */ declare const DateTimeRangePicker: import('react').ForwardRefExoticComponent>; export default DateTimeRangePicker;