MCPcopy Index your code
hub / github.com/adobe/react-spectrum / DatePicker

Function DatePicker

starters/tailwind/src/DatePicker.tsx:23–50  ·  view source on GitHub ↗
({
  label,
  description,
  errorMessage,
  ...props
}: DatePickerProps<T>)

Source from the content-addressed store, hash-verified

21}
22
23export function DatePicker<T extends DateValue>({
24 label,
25 description,
26 errorMessage,
27 ...props
28}: DatePickerProps<T>) {
29 return (
30 <AriaDatePicker
31 {...props}
32 className={composeTailwindRenderProps(
33 props.className,
34 'group flex flex-col gap-1 font-sans'
35 )}>
36 {label && <Label>{label}</Label>}
37 <FieldGroup className="min-w-[208px] w-auto cursor-text disabled:cursor-default">
38 <DateInput className="flex-1 min-w-[150px] px-3 text-sm" />
39 <FieldButton className="w-6 mr-1 outline-offset-0">
40 <CalendarIcon aria-hidden className="w-4 h-4" />
41 </FieldButton>
42 </FieldGroup>
43 {description && <Description>{description}</Description>}
44 <FieldError>{errorMessage}</FieldError>
45 <Popover className="p-2">
46 <Calendar />
47 </Popover>
48 </AriaDatePicker>
49 );
50}

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected