react-simple-timefield icon indicating copy to clipboard operation
react-simple-timefield copied to clipboard

Suggestion about input type

Open LouisCuvelier opened this issue 7 years ago • 3 comments

Hi,

Thanks a lot for your plugin. Amazing work ! 🥇 But, I noticed that you used "text" for your HTML input type. That's not user friendly for mobile users. Instead, what about to use "number" type by default ?

LouisCuvelier avatar Mar 07 '18 17:03 LouisCuvelier

Hi Louis, Thank you for the feedback! This is a good point, let me test this, I'm not sure we can use : with a number type..

antonfisher avatar Mar 07 '18 18:03 antonfisher

So far it doesn't look so easy. Selection methods I used aren't going to work with "number" fields: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange

Note that accordingly to the WHATWG forms spec selectionStart, selectionEnd properties and setSelectionRange method apply only to inputs of types text, search, URL, tel and password.

The only way I see now is to use 3 separate fields for hours/minutes/seconds, need to check how it works.

antonfisher avatar Mar 14 '18 16:03 antonfisher

@antonfisher hi, thx for this package. And what about inputMode="numeric"? https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode browser support is great

milianriedel avatar Nov 15 '22 13:11 milianriedel