I'm working on an app and I need to find a solution that lets users select a time duration for hours and minutes. (Example Form: "How long will you need to archive this?" Selection by user: 2 hours | 20 Minutes) Is there a standard component for this? I only found a picker for dates and clocks.

1 Answer 1


Tom, how granular does this setting have to be?

Especially for less technically savvy users, providing a set of meaningful presets could already do the trick. E.g., here's the menu for setting the alert for a calendar event (taken from Fantastical for Mac):

enter image description here

If you click Custom…, you get to see this:

enter image description here

If that doesn't work, you could simply concatenate static text with either free-form text fields or popup menus, something like this:

Archive for [number] hours and [number] minutes

Note, though, that the error handling for free-form text fields can be annoying, because 2 hours and 65 minutes wouldn't sense. :)

Finally, a quick tip: unless this violates existing styles in your application, consider avoiding verbose questions such as "How long will you need to archive this?" They typically make scanning a set of similar questions more tedious, because the first few words per question usually aren't different enough.

Instead, keep it more concise, as mentioned above: "Archive for…"

Good luck!

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.