Convert numeric entry into formatted time string
Posted on 2016-08-15
I want the user to be able to type numbers - such as 3468 - and for that to be transformed / formatted into a time string. So, 3468 would translate to 34.68 (which is 34 seconds and .68 seconds or 680 milliseconds), 10200 would translate to 1 minute, 2 seconds and 0 milliseconds. So, the user would always have to enter the time down to the milliseconds.
This is for a swimming results website, so users would expect to enter 34.68, not 34.680
I have seen the HTML 5 "time" input type, but I can't get it to only show 2 digits for the milliseconds.
Is there a ready-built control to handle this type of input, that is also cross-browser friendly (and as wide support as possible, including mobile)?