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

Function DateField

starters/docs/src/DateField.tsx:21–35  ·  view source on GitHub ↗
({
  label,
  description,
  errorMessage,
  ...props
}: DateFieldProps<T>)

Source from the content-addressed store, hash-verified

19}
20
21export function DateField<T extends DateValue>({
22 label,
23 description,
24 errorMessage,
25 ...props
26}: DateFieldProps<T>) {
27 return (
28 <AriaDateField {...props}>
29 <Label>{label}</Label>
30 <DateInput>{segment => <DateSegment segment={segment} />}</DateInput>
31 {description && <Description>{description}</Description>}
32 <FieldError>{errorMessage}</FieldError>
33 </AriaDateField>
34 );
35}
36
37export function DateSegment(props: DateSegmentProps) {
38 return <AriaDateSegment {...props} />;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected