The DateTimePicker component is designed to work seamlessly with react-hook-form. When integrating it into a form, pass the following props to connect it to the form state:
name: The name of the field in the form.dateTime: The current value of the date/time.setDateTime: The callback function to update the value (typically onChange).onBlur: The blur handler for form validation/tracking.disabled: Boolean to disable the picker.autoComplete: Set to "off" to prevent browser interference.aria-describedby: Accessibility attribute (can be passed as undefined).
<DateTimePicker
name={name}
dateTime={value}
setDateTime={onChange}
onBlur={onBlur}
disabled={disabled}
autoComplete="off"
aria-describedby={undefined}
/>