79492038

Date: 2025-03-07 11:00:38
Score: 1
Natty:
Report link

You could add an inputRef to your DatePicker component as:

<DatePicker inputRef={inputRef} .... , where

const inputRef = React.useRef<any | null>(null) and when there is an error, you can focus the inputRef like:

setTimeout(() => inputRef.current?.focus())

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: cech