"use client"; // Adapted from Adobe React Spectrum starters (Apache-2.0). // Modified: owned composition, local runtime, scoped CSS and customization. // See THIRD_PARTY_NOTICES.md. import { DateRangePicker as AriaDateRangePicker, type DateRangePickerProps as AriaProps, type DateValue, DateInput, DateSegment, Group, Button, Popover, Dialog, RangeCalendar, CalendarGrid, CalendarCell, Heading, Label, Text, FieldError, type ValidationResult, composeRenderProps, } from "./react-aria-runtime.js"; import type { CSSProperties } from "react"; export { parseDate, today, getLocalTimeZone } from "./react-aria-runtime.js"; export interface DateRangePickerProps extends Omit< AriaProps, "children" > { label: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); popoverClassName?: string; popoverStyle?: CSSProperties; } export function DateRangePicker({ label, description, errorMessage, className, popoverClassName, popoverStyle, ...props }: DateRangePickerProps) { return ( `ynr-date-range-picker ynr-aria ${value ?? ""}`, )} > {(segment) => ( )} {(segment) => ( )} {description && ( {description} )} {errorMessage}
{(date) => ( )}
); }