6

I saw a few posts about dates and what not. I was wondering what the best solution would be to get time. It needs to be an exact time and it would be nice to support both time formats.

Should i just let the user input time using a textbox and then have a radio selection to choose between AM/PM/Military. Not really sure what the best method would be here to support both ways.

Thanks

3
  • By exact time, do you mean that the seconds are important to your customers? Would a 1 second difference matter? 10 seconds? 60 seconds?
    – JohnGB
    Commented Oct 18, 2011 at 10:23
  • Most people outside the US on "Military" time won't know what "Military" time is =) at least call it 24 hour clock, but as others have noted just use the OS setting if at all possible.
    – Zelda
    Commented Oct 18, 2011 at 14:06
  • @BenBrocka Yea that's fine, I didn't really know what to call it.
    – Matt
    Commented Oct 19, 2011 at 2:36

5 Answers 5

2

Shouldn't you just connect to the regional settings of the machine? If the machine is configured to use AM/PM allow the user only to enter in AM/PM mode. Otherwise use the 24h time format.

enter image description here

The main question here to answer is: will users have a need to choose a different input mode each time they need to input a time? I cannot imagine the answer here would be yes. Allowing 2 modes will have many downsides. It adds unnecessary complexity to the UI. Which mode will you choose as default? Suppose you choose AM/PM mode as default, and I am a user that wants 24h mode. So each time I want to enter a time, I need to set it to 24h mode? That sounds very annoying.

My advise: keep it simple. Use the regional settings from the OS and only allow time to be entered in that format.

1
  • 1
    after some consideration, i think i like this answer. While a lot of the other posts said the same thing here, it wasn't quite as complete. I think i will create a time input like the windows input as you have above and what was mentioned elsewhere and get the locale, defaulting to AM/PM, since this is a web app(javascript could be blocked), only way to get that info is from javascript and maybe html5
    – Matt
    Commented Oct 19, 2011 at 2:49
3

The alternative of AM/PM is not "military" as you point out, it is what almost the entire world uses.

You say "it would be nice to support both time formats". I would like to disagree with you there. It would be nice if your application takes into account what the user's preference is and only show time in that format.

2
  • 3
    Agree, but instead of adding an option to the application, simply take the OS setting. Commented Oct 18, 2011 at 13:59
  • @user9109 i should have mentioned this is a web form. So getting locale may not be 100% accurate.
    – Matt
    Commented Oct 19, 2011 at 2:35
2

I recently had to design an app and after some thinking and testing this was the best way to have the user input time:

Form time input http://www.freeimagehosting.net/t/56c21.jpg

I think this is the best because it's really easy to select time both with the mouse and the keyboard. The user can quickly go to the first combo and type 9 and to the next and type the minutes. And you can support both time formats with another combo for AM/PM, or adding the AM/PM directly with the hours combo.

1
  • I'd like to inform you that many users (I think the largest part of the world) don't even know what AM and PM stand for. For them it is very strange to see this on a UI. They just want to see time the way it is displayed on their digital wrist watches. Commented Oct 18, 2011 at 13:17
0

This is how Windows does it:

enter image description here

Not much you can improve, really. Just missing a small drop-down for am/pm/24, which, btw, can probably deduce at least whether the users wants 24h by the value of the HH in the time box. So it can start with am, and if the user inputs, say 15, it can switch to 24 automatically, which would save 24h users about 50% of the method-selection effort.

2
  • 2
    So if I enter 13 it would read 13:00 PM? That looks very unfamiliar. As a European user I don't want to see AM or PM, I don't even know what it means. Commented Oct 18, 2011 at 13:19
  • no, as I said, if you enter anything higher than 12 it automatically selects the 24h option. Commented Oct 19, 2011 at 12:52
0

partialbits

Time Picker JqueryUI Plugin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.