'use client'; import {CalendarIcon} from 'lucide-react'; import React from 'react'; import { DateRangePicker as AriaDateRangePicker, type DateRangePickerProps as AriaDateRangePickerProps, type DateValue, type ValidationResult } from 'react-aria-components/DateRangePicker'; import {DateInput} from './DateField'; import {Description, FieldError, FieldGroup, Label} from './Field'; import {Popover} from './Popover'; import {RangeCalendar} from './RangeCalendar'; import {composeTailwindRenderProps} from './utils'; import {FieldButton} from './FieldButton'; export interface DateRangePickerProps extends AriaDateRangePickerProps { label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); } export function DateRangePicker({ label, description, errorMessage, ...props }: DateRangePickerProps) { return ( {label && }
{description && {description}} {errorMessage}
); }