diff --git a/packages/@react-aria/datepicker/src/useDatePicker.ts b/packages/@react-aria/datepicker/src/useDatePicker.ts index 166b33b7459..dbed4f8288c 100644 --- a/packages/@react-aria/datepicker/src/useDatePicker.ts +++ b/packages/@react-aria/datepicker/src/useDatePicker.ts @@ -53,6 +53,7 @@ export interface DatePickerAria { export function useDatePicker(props: AriaDatePickerProps, state: DatePickerState, ref: RefObject): DatePickerAria { let buttonId = useId(); let dialogId = useId(); + let fieldId = useId(); let stringFormatter = useLocalizedStringFormatter(intlMessages); let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({ @@ -113,6 +114,7 @@ export function useDatePicker(props: AriaDatePickerProps }, fieldProps: { ...fieldProps, + id: fieldId, [roleSymbol]: 'presentation', 'aria-describedby': ariaDescribedBy, value: state.value,