react-dates/react-dates using day picker on mobile causes the keyboard to appear and disappear

144 views Asked by At

When using react-dates in my app, I've found that on mobile when the user taps a date in the calendar popup it triggers the mobile keyboard to appear and immediately disappear.

I've found that adding inputmode="none" to the inputs seems to fix the issue but I can't find anything in the react-dates docs that will allow me to specify an inputmode.

A screen recording of the issue can be found here: https://youtube.com/shorts/p0qXhzMvuag?feature=share

Has anyone else found an alternative solution to this issue?

1

There are 1 answers

0
Andrew Tempany On

Solution I found:

The readOnly prop still allows for onClick functions, so rather than specifying the input mode, I gave the the react-dates component readOnly={true}