Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Time Field Text Input With Colon

    Hi,

    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'.

    Thanks
    Last edited by busdriver99; 12-17-2010 at 06:04 PM.

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •