MCPcopy Create free account
hub / github.com/adobe/react-spectrum / DatePicker

Function DatePicker

starters/docs/src/DatePicker.tsx:23–45  ·  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 {...props}>
31 <Label>{label}</Label>
32 <Group>
33 <DateInput>{segment => <DateSegment segment={segment} />}</DateInput>
34 <FieldButton>
35 <ChevronDown />
36 </FieldButton>
37 </Group>
38 {description && <Description>{description}</Description>}
39 <FieldError>{errorMessage}</FieldError>
40 <Popover hideArrow>
41 <Calendar />
42 </Popover>
43 </AriaDatePicker>
44 );
45}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected