Hacker0x01 / react-datepicker

A simple and reusable datepicker component for React
https://reactdatepicker.com/
MIT License
8.06k stars 2.24k forks source link

Support ref.focus() alias #4834

Open danilofuchs opened 4 months ago

danilofuchs commented 4 months ago

Is your feature request related to a problem? Please describe. When using react-hook-form, it's ability to focus on the input automatically on error uses ref.focus().

However, react-datepicker uses the nomenclature ref.setFocus()

Describe the solution you'd like An alias ref.focus() to allow better compatibility with the ecosystem

Describe alternatives you've considered

Additional context https://react-hook-form.com/docs/useform/setfocus image