({
label,
description,
errorMessage,
...props
}: DateRangePickerProps<T>)
| 21 | } |
| 22 | |
| 23 | export function DateRangePicker<T extends DateValue>({ |
| 24 | label, |
| 25 | description, |
| 26 | errorMessage, |
| 27 | ...props |
| 28 | }: DateRangePickerProps<T>) { |
| 29 | return ( |
| 30 | <AriaDateRangePicker |
| 31 | {...props} |
| 32 | className={composeTailwindRenderProps( |
| 33 | props.className, |
| 34 | 'group flex flex-col gap-1 font-sans max-w-full' |
| 35 | )}> |
| 36 | {label && <Label>{label}</Label>} |
| 37 | <FieldGroup className="min-w-[208px] w-auto cursor-text disabled:cursor-default"> |
| 38 | <div className="flex-1 w-fit flex items-center overflow-x-auto overflow-y-clip [scrollbar-width:none]"> |
| 39 | <DateInput slot="start" className="ps-3 pe-2 text-sm" /> |
| 40 | <span |
| 41 | aria-hidden="true" |
| 42 | className="text-neutral-800 dark:text-neutral-200 forced-colors:text-[ButtonText] group-disabled:text-neutral-200 dark:group-disabled:text-neutral-600 forced-colors:group-disabled:text-[GrayText]"> |
| 43 | – |
| 44 | </span> |
| 45 | <DateInput slot="end" className="flex-1 ps-2 pe-3 text-sm" /> |
| 46 | </div> |
| 47 | <FieldButton className="w-6 mr-1 outline-offset-0"> |
| 48 | <CalendarIcon aria-hidden className="w-4 h-4" /> |
| 49 | </FieldButton> |
| 50 | </FieldGroup> |
| 51 | {description && <Description>{description}</Description>} |
| 52 | <FieldError>{errorMessage}</FieldError> |
| 53 | <Popover className="p-2"> |
| 54 | <RangeCalendar /> |
| 55 | </Popover> |
| 56 | </AriaDateRangePicker> |
| 57 | ); |
| 58 | } |
nothing calls this directly
no test coverage detected