"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 { DatePicker as AriaDatePicker, type DatePickerProps as AriaProps, type DateValue, DateInput, DateSegment, Group, Button, Popover, Dialog, Calendar, 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 DatePickerProps extends Omit< AriaProps, "children" > { label: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); popoverClassName?: string; popoverStyle?: CSSProperties; } export function DatePicker({ label, description, errorMessage, className, popoverClassName, popoverStyle, ...props }: DatePickerProps) { return ( `ynr-date-picker ynr-aria ${value ?? ""}`, )} > {(segment) => ( )} {description && ( {description} )} {errorMessage}
{(date) => ( )}
); }