Skip to main content

Time picker

This page includes information about TimePicker and TimezonePicker.

Usage

Overview

The time picker component enables users to select a time from a dropdown. This component is commonly used in insurance applications where users need to specify a time, such as scheduling an appointment or setting a reminder.

When to use

To select a time or add a custom time.

When not to use

Formatting

Anatomy

image illustrating the anatomy of the time picker component Anatomy of the time picker component.

  1. Label: Describes the purpose of the input field.
  2. Help text (optional): Gives extra context or helps the user choose the right selection.
  3. Dropdown input: Displays the user selected option. Users can type inside the input field to find an option that matches their query. They can also input a custom time.
  4. Dropdown menu: Displays a list of times to choose from.

Options

The time picker component can accommodate both a 12-hour clock and a 24-hour clock. Use the format that corresponds to the region in which your product is available. For example, the United States uses the 12-hour clock.

image that illustrates the time picker component with the 12-hour clock and the 24-hour clock

Day period marker

In a 12-hour clock system, the 24-hour day is divided into two periods, "AM" and "PM", and each period consists of 12 hours.

The format of the day period marker is determined by the user's locale. Developers have no control over it. For the en-US locale, the default way to write the day period marker is "AM" and "PM".

image that illustrates how to format the day period marker for the en-US locale The format of day period marker is determined by the user's locale. This example is using the en-US locale.

Typeahead

Jutro accommodates dropdown menus with typeahead input fields. Users can manually enter text to filter the dropdown items. This feature is useful for helping users select from a long list.

Dropdowns with typeahead enabled provide suggestions as users begin typing. Selections appear based on the characters that users have entered. The more characters that users input into the field, the more refined the list becomes.

image that illustrates the time picker component with typeahead functionality

Time zone

A time picker can include an input control for time zone. The time zone picker also supports typeahead functionality, enabling users to filter through the list of options.

image that illustrates the time zone picker component with typeahead functionality

Content

General writing guidelines

  • Use sentence case for all aspects of designing Guidewire product interfaces. Don't use title case.
  • Use present tense verbs and active voice in most situations.
  • Use common contractions to lend your copy a more natural and informal tone.
  • Use plain language. Avoid unnecessary jargon and complex language.
  • Keep words and sentences short.

Include a label

Place a clear, visible label outside the input field. An input field without a label is ambiguous and not accessible.

Do position a permanent label outside the field.
Don't use placeholder text as a replacement for the field label.

Don't use placeholder text

Don't put placeholder text in the input field. Placeholder text strains users' short-term memory because it disappears once a value is entered. It also poses additional burdens for users with visual and cognitive impairments.

Instead, place hints and instructions, including formatting examples and requirements, outside of the field.

The input field for time picker follows the content guidelines for text fields.

Source: Nielsen Norman Group

Do place hints and instructions, including formatting examples and requirements, outside of the field.
Don't add placeholder text to the input field.

Use error text to guide users

Error message text tells a user how to fix the error. In the case of the time picker, errors are often related to something that must be fixed for in-line validation.

Invalid fields must be clearly marked. In pickers with more than one field, set the invalid state on the individual field that is triggering the error.

Use sentence case for error text. Write 1-2 short, complete sentences that end with a period.

Do use error text to guide the user and show them a solution.
Don't write ambiguous error messages or leave users guessing as to how to resolve a problem.

Mark required fields

Use an asterisk (*) to indicate required fields. The asterisk precedes the field label. This helps users to easily locate which fields are required by scanning just the left-most character of the label.

Do use an asterisk to indicate that a field is required.
Don't use an asterisk to denote anything that is optional.

Use sentence case

Field labels appear in sentence case.

Refer to the UI text style guide for more information on how to implement sentence case.

Do use sentence case.
Don't use title case.

Behaviors

States

The time picker appears with no value (default), placeholder text, or a filled input.

VisualStateDescription
Time picker with no valueNo value (default)Indicates to the user that no value has been selected and there is no placeholder.
Time picker with placeholder textPlaceholderIndicates to the user that no value has been selected. The placeholder is greyed out.
Time picker with filled inputFilled inputIndicates to the user that the input is filled with data.

The time pickers also has interactive states for enabled, focus, disabled, error, read-only, and display-only.

StateDescription
EnabledIndicates to the user that the element is enabled for interaction.
FocusIndicates to the user which UI element in the system is focused.
DisabledIndicates to the user that the input value can't be changed because of local factors. For example, a checkbox above the input field must be checked to access this input field. The user can take action to enable it by interacting with the page.
ErrorIndicates that the user has made a validation error. Error text provides corrective feedback to users.
Read-onlyIndicates to the user that the input value can't be changed because of outside factors. For example, lack of write access. The user can take action to enable it by, for example, contacting an administrator.
Display-onlyThe display-only state is used for two cases:
  • A UI element is used in display mode.
  • A UI element is displayed in edit mode, but is never editable.
This state was called “read-only” before.

The following image illustrates time picker interactive states.

Image illustrating time picker interactive states: enabled, focus, disabled, error, read-only, and display-only

Interactions

Mouse

Users can interact with this element by clicking in the area inside border.

Image illustrating time picker interactions with mouse

Keyboard

The time picker is expanded and collapsed with SPACEBAR. Users navigate through the options using the arrow keys and select by means of the SPACEBAR or ENTER key.

Screen reader

The aria-labelledby establishes a programmatic association between the input field and its label. The WAI-ARIA attribute of aria-autocomplete='list' communicates that a list of choices will appear from which the user can choose, but the edit box retains focus. Selecting the 'required' option in Storybook adds both the 'required' and 'aria-required="true"' attributes to the input field.

Accessibility

This component adheres to the following criteria for color and zoom accessibility:

  • Color: The contrast ratio of textual elements against their background is above 4.5:1 as per WCAG 2.0 AA requirements.
  • Zoom: All content is visible and functional up to and including a zoom factor of 200%.

This component has been validated to meet the WCAG 2.0 AA accessibility guidelines. However, changes made by the content author can affect accessibility conformance. When using this component within your application:

  • Clearly state formatting requirements.
  • Avoid using placeholder text.
  • Use meaningful copy for error text.
Legal and support information

Published: March 19, 2025 at 8:59 AM

© 2025 Guidewire Software, Inc.