katemihalikova / ion-datetime-picker

Date and/or time picker for awesome Ionic framework
MIT License
169 stars 101 forks source link

Added option to use tel type for time fields #72

Open smoyte opened 7 years ago

smoyte commented 7 years ago

Unless there is some reason not to? Thanks for considering!

katemihalikova commented 7 years ago

Hi Tom, thanks for your contribution!

There was some discussion in #3, #42 and #43. It is not possible to use type="number" because the field features prefix zero which is not supported by that type. I've decided that we can use type="tel" as an optional feature (use some attr to switch type="text" to type="tel"). If you are interested, feel free to implement it :)

Thanks again for your work!

smoyte commented 7 years ago

How about now? I haven't tested this but it seems straightforward enough...

katemihalikova commented 7 years ago

This won't work as expected, because $scope.timeFieldType is a function, but it is used as a string value in the template. But we can simplify this more, see review notes.

smoyte commented 7 years ago

Haven't forgotten about this one! Just short on time ATM. Hope to finish this up within the year :)

katemihalikova commented 7 years ago

No problem, take your time 👍

bettysteger commented 7 years ago

Maybe you could also add

autocomplete="off" autocorrect="off" spellcheck="false"

to the input field, because I got an "ugly" autocorrect bar above the keyboard (KeyboardAccessoryBar) and autocomplete/autocorrect suggestions are not necessary when changing the time ⌛️ 😅