pushtell / react-bootstrap-date-picker

React-Bootstrap based date picker.
MIT License
346 stars 195 forks source link

Component's behaviour in tablet, mobile #150

Open LidaDimitriadi opened 6 years ago

LidaDimitriadi commented 6 years ago

Expected Behavior

When user types a date, the component should automatically add "/" and the cursor should always be at the end of the string.

Current Behavior

On tablet or mobile (android-chrome, possibly ios), when user types a date and the "/" is displayed, the cursor moves before the last char.

For example user types: 12/1 and cursor moves before the "1" char so if he continues the result is 12/01 instead of 12/10.

It probably has to do with the keypress, keyup events which chrome on tablet/mobile doesn't recognise.