fengyuanchen/pickerjs

Avoid tab when the picker is open

Opened this issue · 1 comments

(Thanks for sharing this, it's a really good date picker!)

Is your feature request related to a problem? Please describe.
When the picker is open, pressing tab should not move the cursor in other fields, which can -also- cause some other pickers to show

Describe the solution you'd like
if the picker is open, a preventDefault() should be called if event.key is tab

Hi, I had the same problem than you.
But apparently, you can fix it by adding tabindex="-1" on the inputs where you want to use the picker. It works well for me in Chrome and Firefox.