Open erikandershed opened 7 years ago
I agree, that would be a better user experience (although some people would suggest using the native HTML5 date input on mobile would be even better - you may wish to consider that).
There is no easy way to do it with the current plugin code because of the way the placeholder text is implemented ('DD' is not a valid value for a numeric input). However changing that to use the HTML5 placeholder attribute and then setting the input type to number should do the trick. I aim to do this soon but I'm happy to look at patches if you're impatient.
I was only thinking of adding pattern to the inputs that is added by the jquery-datetextentry. It would make the input for a user faster then today. But maybe the HTML5 date is the best way, but I still think this is a quick fix for adding a higher the user experience.
Where in the code can I add pattern="\d*" for the 3 input the script is adding?
Just search for "<input" in jquery.datetextentry.js.
Thanks! I did change the input in the jquery.datetextentry.js on line 510 to pattern="[0-9]*". It works great :)
How do I add mobile numbers keyboard to the input. This will make a nicer the user experience