Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid react date picker calendar to open on tab keypress from previous textbox

We have installed react-datepicker component. The default behaviour is that the calendar is getting opened on tab keypress from previous field. How can I avoid this. Please suggest as I am unable to override the default behaviour of this component. I just want the focus to be on this control when tab is pressed.

like image 535
pratham gn Avatar asked Dec 01 '25 11:12

pratham gn


1 Answers

You can use preventOpenOnFocus property

<DatePicker
  ...
  preventOpenOnFocus={true}
/>
like image 84
Angel Alvarez Pérez Avatar answered Dec 04 '25 02:12

Angel Alvarez Pérez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!