View Full Version : Time Field Text Input With Colon

12-17-2010, 02:45 PM

I am creating a form with a time field to be entered into a text input type. I would like for the field to be pre-populated with the colon (: ) and have the user be able to click once to enter the time and have the colon persist when typing or deleting. For example, if entering the time 12:34, the user would enter '12', then the cursor would skip to the 4th character and the user could enter '34.

Similarly, if deleting '12:34', the user would delete the '34' and the cursor would skip to the '12'.


12-17-2010, 03:27 PM
Well a simple solution would be split the time into two fields. One for the hour and one for the minutes. Then just manually insert the colon as text inbetween them.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum