This guideline now covers both SAPUI5 and SAP Web Components. Learn more.
Information
Icon
false

Intro

The time picker component lets users select a localized time using touch, mouse, or keyboard input in 12-hour or 24-hour format. Users can either type a time directly or use the visual clock face to choose hours, minutes, and seconds.

A standard time picker input field displaying 4:30 PM on the left and a clock icon button on the right.

Time picker

Component availability

The component is available in the following libraries:

<div> <div data-valign="middle">Library</div> <div data-valign="middle">Technical Name</div> <div data-valign="middle">Identifier</div> </div> <div> <div data-valign="middle">SAPUI5 Demo Kit</div> <div><a href="https%3A%2F%2Fui5.sap.com%2F%23%2Fentity%2Fsap.m.TimePicker">sap.m.TimePicker</a></div> <div data-valign="middle">:badge, info, large, _, SAPUI5:</div> </div> <div> <div data-valign="middle">SAP Web Components</div> <div data-valign="middle"><a href="https%3A%2F%2Fui5.github.io%2Fwebcomponents%2Fcomponents%2FTimePicker%2F">ui5-time-picker</a></div> <div data-valign="middle">:badge, info, large, _, SAP Web Components:</div> </div> <div> <div data-valign="middle">SAP Web UI Kit (Figma)</div> <div data-valign="middle"><a href="https%3A%2F%2Fwww.figma.com%2Fdesign%2FSILcWzK5uFghKun9jx6D7c%2FSAP-Web-UI-Kit%3Fnode-id%3D193778-1070">Time Picker</a></div> <div data-valign="middle">:badge, info, large, _, Figma:</div> </div>
<div> <div data-valign="middle">Library</div> <div data-valign="middle">Technical Name</div> <div data-valign="middle">Identifier</div> </div> <div> <div data-valign="middle">SAPUI5 Demo Kit</div> <div><a href="https%3A%2F%2Fui5.sap.com%2F%23%2Fentity%2Fsap.m.TimePicker">sap.m.TimePicker</a></div> <div data-valign="middle">:badge, info, large, _, SAPUI5:</div> </div> <div> <div data-valign="middle">SAP Web Components</div> <div data-valign="middle"><a href="https%3A%2F%2Fui5.github.io%2Fwebcomponents%2Fcomponents%2FTimePicker%2F">ui5-time-picker</a></div> <div data-valign="middle">:badge, info, large, _, SAP Web Components:</div> </div> <div> <div data-valign="middle">SAP Fiori for Web UI Kit (Figma)</div> <div data-valign="middle"><a href="https%3A%2F%2Fwww.figma.com%2Fcommunity%2Ffile%2F1494295794601744471">Time Picker</a></div> <div data-valign="middle">:badge, info, large, _, Figma:</div> </div>

When to Use

2
do
false

Use the time picker to:

  • Enable users to select a time.
  • Enable users to select a time range. In this case, one time picker can be used to set the starting time and a second one to set the end time.
dont
false

Don’t use the time picker to:

  • Let users select a standard duration, such as 15 minutes, 30 minutes, 1 hour, or 2 hours. In this case, use the select component instead.
toptip
  • Use the time picker input field to let users enter a time value by typing it.
  • Use the basic time picker for users who work with or prefer the 24-hour format.
  • Use the time picker with an AM/PM switch for users who are accustomed to the 12-hour format.
  • Hide the seconds field by default and add it only when it is relevant for the use case.
  • Use an icon button, text button, or link to trigger open the time picker popover when space is limited or when required by the application logic.
  • Provide tooltips for the time picker button and the clock selection interface to improve clarity and discoverability.
  • Set a default time to display an initial value in both the input field and the popover.
  • Enable the input mask to guide users and help prevent invalid entries.
  • Keep interaction consistent across devices, including desktop, tablet, and smartphone.
  • Use compact mode on desktop and cozy mode on mobile and tablet to match the device context.

Anatomy

Time picker input filed

  1. Time picker input field: The container in which a user enters data. It could contain a mask.
  2. Time picker button: The button that opens the time picker popover.

Time picker input field anatomy with number pointers for its elements – input field (1) and time picker button (2).

Time picker input field anatomy

Time picker popover

  1. Time picker container
  2. Hours field: Displays the hour entered or selected.
  3. Minutes field: Displays the minutes entered or selected.
  4. Seconds field (optional): Displays the seconds entered or selected.
  5. AM/PM switch: The switch is displayed if the user has opted for the 12-hour format.
  6. Clock face for selecting the time: The appearance of the clock face depends on the focus (hours, minutes, or seconds) and the time format (12-hour or 24-hour clock).
  7. Footer: Displays OK and Cancel buttons.

Time picker popover anatomy with numbered pointers for its elements – container, hours field, minutes field, seconds field, AM/ PM switch, clock face and footer with OK and Cancel buttons.

Time picker popover anatomy

Clock face

  1. Clock face circle: The circular container that defines the clock’s shape and holds all interactive elements.
  2. Tick marks: Visual indicators that help users read and select precise time values.
  3. Number selector: Numeric values shown sequentially around the clock face that users select a specific hour, minute, or second value.
  4. Selected hours/minutes/seconds: Highlights the currently chosen value on the clock face.
  5. Hours/minutes/seconds label: Displays the unit currently being edited (hours, minutes, or seconds).

Time picker popover anatomy with numbered pointers for clock face circle, tick marks, number selector, selected hour, hours label.

Time picker clock face

guideline
The default display format doesn’t include seconds. You can add the seconds field if it’s relevant for your use case.

Types

The time picker supports two formats: the 12-hour format with AM/PM, and the 24-hour format.
A. Time picker with AM/PM switch is best suited for users who are accustomed to AM/PM time.
B. Basic time picker works best for users who are used to and prefer the 24-hour format.

A time picker with tick marks for 12 hours and an AM/ PM switch next to another time picker with tick marks for hours in 24 hour format.

Time picker types

States

The time picker incorporates various states to ensure a clear and intuitive user experience, enhancing both interaction and status validation. Each state visually communicates the component's current status and supports user navigation.

Component states

A. Enabled: The component is interactive.

B. Disabled: The component is visible but not interactive.

C. Read-only: The component is visible and its value can be read, but not edited.

Three time picker input fields in Enabled, Disabled, and Read-only component states.

Time picker component states

For more information, see Component States.

Interaction states

The time picker has five interaction states: regular, hover on input, hover on button, active input, and active button, that represent different parts of the component.

A. Regular: The default state of the input field and the button.

B. Hover on input: When the cursor hovers over the input field.

C. Hover on button: When the cursor hovers over the time picker button.

D. Active: The input field is focused, allowing the user to enter or edit the time.

E. Active button: The time picker button is active, displaying the calendar.

Time picker showing five interaction states: regular, hover on input, hover on button, active input field, and active button with an open clock face picker.

Time picker interaction states

For more information, see Interaction States.

Value states

The time picker input supports four value states that describe the status of the entered value:

A. Negative: Indicates an invalid time value.

B. Critical: Indicates a time value that requires attention.

C. Positive: Indicates a valid time value.

D. Information: Signals neutral status or context without implying errors or warnings.

Four time picker input fields in Negative, Critical, Positive, and Information value states, shown with red, yellow, green, and blue highlights.

Time picker value states

Value states with value state messages

When users enter a time in the input field, the time picker displays value state messages that indicate whether the entered time is valid or requires attention. When they trigger the popover, the value state message also appears there.

Note: The positive state does not display a value state message.

Three time picker dialogs in Negative, Critical, and Information value states, shown with red, yellow, and blue highlights and matching value state message popovers above open clock face pickers.

Time picker value state messages

For more information, see Value States.

Focus state

The focus state indicates which element is focused. When the popover with the clock interface is opened, the focus goes to hours and minutes field and then to the footer buttons. The clock face circle reflects the time entered in the fields, but it doesn’t receive the focus state.
A. Unfocused state applies to all units that are not focused.
B. Focused state is visualized by an additional border around the input field, the time outputs inside the time picker popover, or the footer actions.

Time picker showing unfocused and focused states on the input field, time values inside the open clock face picker, and footer action buttons with additional focus outlines.

Unfocused and focused states for the time picker

For more information, see Focus States.

Selection state

The selection state is applied after the user selects an element. The selected element is clearly distinguished from the other elements.

A. Unselected: The state occurs when an element is not selected, displaying the element in its regular (default) state.

B. Selected: The state shows that an element is selected and visually differs from the unselected state.

Time picker showing unselected and selected states for minute values, with the selected value highlighted in the input field and on the clock face picker.

Time picker selection states

For more information, see Selection States.

Behavior and Interaction

Users can set the time in two ways:

Entering a time in the input field

Users can manually enter the time directly into the input field. On desktop devices, the user selects the time input field and enters the time using the keyboard.

A. Shows placeholder text when no value has been entered.

B. Displays an active input field ready to take user input.

C. Shows the selected or typed time after entry is complete.

Three-step sequence showing a time picker input field with placeholder text “e.g. 23:59” (A), an active input mask ready for typing (B), and a completed time value showing “20:15” after entry is complete (C).

Time picker input field with mask

Time selection with the time picker popover

When the user chooses the time picker button (A), the component opens a popover with the clock selection interface (B). Time can be entered by typing directly into the hours and minutes fields or by selecting values from the clock interface. The popover fields display the current time by default.

To adjust the time, users can click the clock face circle or a tick mark to pick a value, or drag along the clock face for more precise adjustment. Once a value is chosen (B), the view automatically moves to the next time unit in the sequence (C). Focus shifts to the corresponding field, which enters its toggled state. If the last unit has been selected, the view does not change further.

The interaction pattern is consistent across desktop, tablet, and mobile. After a time value is chosen, the view automatically advances to the next segment in the sequence, or remains on the final segment if it is the last one. To adjust a previously selected value, users can simply select the corresponding time field. Clicking or tapping OK button in the footer confirms the selection, while choosing Cancel or clicking or tapping outside the popover discards all changes.

Three-step sequence of a time picker opening from the input field, displaying hour selection on the clock face picker, followed by minute selection on the next clock face view.

Time picker button and popover interaction

Opening the time picker from another component :badge, info, large, _, SAPUI5 Only:

The time picker can be triggered by another component such as text button, icon button, or link. In this case, the time picker popover opens without the input field.

Icon button, text button, and text link shown alongside an open time picker popover.

Opening time picker popover from another component

Tooltip

The time picker component supports tooltips for the button, the time fields, and the input field.

Time picker input field and open clock face picker showing an "Open Picker" tooltip for the time picker button and a "Minutes" tooltiop for the minutes field.

Tooltips on the time picker button and minutes field

Responsiveness

Time picker sizes

The time picker is responsive and adapts to different devices. The examples below show how the component adjusts its size and layout based on screen resolution and interaction type. Use cozy mode for sizes S and M, and compact mode for size L and above.

Touch devices size S and M

Time picker input field

Tapping the input field on mobile devices opens an additional popover. To set the value, the user enters the desired value into each input field using the native mobile keyboard and switches between AM/PM within the popover. Footer actions confirm or abort the chosen time value.

Two-step sequence showing a time picker input field in cozy mode followed by an open input popover with hour, minute, and AM or PM selection fields.

Time picker input popover in cozy mode

Time picker popover on smartphones

Tapping the time picker button opens the time picker popover. On smartphones, the popover expands into a full screen dialog. Users can select a time by dragging the handle around the dial or by tapping the tick marks on the clock face circle. The chosen value is displayed in the time field at the top.

The interaction pattern is the same as on desktop. After a time value is chosen, the view automatically advances to the next segment in the sequence, or remains on the final segment if it is the last one. To adjust a previously selected value, users can tap the corresponding time field.

The time picker then waits for the user’s confirmation in the footer to close the dialog and apply the selected time. Tapping OK finalizes the chosen value and writes it back to the input field. Tapping Cancel, or tapping outside the popover, closes the dialog without applying any changes.

Two smartphone-sized time picker dialogs in cozy mode showing hour selection followed by minute selection on the clock face picker.

Time picker in size S in cozy mode

Time picker popover on tablets

On tablets, the time picker opens as a standard overlay popover, following the same interaction pattern as described above.

Two tablet-sized time picker popovers in cozy mode showing hour selection followed by minute selection on the clock face picker.

Time picker in size M in cozy mode

Desktop devices size L

The time picker appears as a popover when the time picker button is triggered. Use compact mode on desktop to support mouse and keyboard interaction.

For more information, see Content Density (Cozy and Compact).

Accessibility

SAP follows international standards, such as WCAG and WAI-ARIA, and strives to make our business solutions accessible and inclusive.

For more information, see Accessibility in SAP Fiori and the Accessibility Design Tools Handbook.

Keyboard navigation

The following keyboard combinations are supported by the SAPUI5 time picker component.

<div> <div>Key Combination</div> <div>What It does</div> </div> <div> <div><strong>Tab</strong></div> <div>Moves the focus to the time input field. The time picker dropdown remains closed. If the input field has an entered value, it gets selected.</div> </div> <div> <div><strong>Shift + Tab</strong></div> <div>Backward navigation.</div> </div> <div> <div> <p><strong>Alt + Up Arrow or</strong></p> <p><strong>Alt + Down Arrow or F4</strong></p> </div> <div>If the time picker dropdown is closed, it opens.<br>If the time picker dropdown is opened, it closes.</div> </div> <div> <div><strong>Escape</strong></div> <div>Cancels any changes and reverts to the value which the time picker had when it got the focus.</div> </div> <div> <div> <p><strong>Home</strong></p> <p><strong>End</strong></p> </div> <div>Moves the cursor to the first or last position.</div> </div> <div> <div> <p><strong>Right Arrow</strong></p> <p><strong>Left Arrow</strong></p> </div> <div>Moves the cursor by one position in the corresponding direction.</div> </div> <div> <div><strong>Ctrl + A</strong></div> <div>Selects the entire content.</div> </div> <div> <div> <p><strong>Delete</strong></p> <p><strong>Backspace</strong></p> </div> <div>Deletes the character on the right or left of the cursor position. If the value is selected, it gets deleted.</div> </div> <div> <div> <p><strong>Shift + Right Arrow</strong></p> <p><strong>Shift + Left Arrow</strong></p> </div> <div>Selects the character to the right or left, one by one, starting from the cursor position.</div> </div> <div> <div><strong>Ctrl + C or Ctrl + Insert</strong></div> <div>Copies the selected text to the clipboard.</div> </div> <div> <div><strong>Ctrl + X or Shift + Delete</strong></div> <div>Cuts the selected text and copies it to the clipboard.</div> </div> <div> <div><strong>Ctrl + V or Shift + Insert</strong></div> <div>Pastes the text from the clipboard to the cursor position.</div> </div> <div> <div> <p><strong>Page Up</strong></p> <p><strong>Page Down</strong></p> </div> <div>Increments or decrements the hours by one.</div> </div> <div> <div> <p><strong>Shift + Page Up</strong></p> <p><strong>Shift + Page Down</strong></p> </div> <div>Increments or decrements the minutes by one.</div> </div> <div> <div> <p><strong>Shift + Ctrl + Page Up</strong></p> <p><strong>Shift + Ctrl + Page Down</strong></p> </div> <div>Increments or decrements the seconds by one.</div> </div> <div> <div>Characters</div> <div>Only letters/numbers that correspond to the expected format are allowed.</div> </div>

Screen reader support

For details on screen reader support and Accessible Rich Internet Applications (ARIA), see UI5 Screen Reader Support and WAI-ARIA Authoring.

Content

Placeholder

The time picker displays a placeholder that shows the expected time format.

A: Time picker in h∶mm format

B: Time picker in HH∶mm∶ss format.

C: Time picker with a custom placeholder.

Three time picker input fields with different placeholder formats – 1:20 AM, 01:23:23, Enter time.

Time picker with different format patterns

Time picker clock faces

The time picker supports different clock faces that adapt based on the active time unit.
A. Hours face: Displays when the user first opens the time picker, allowing hour selection.
B. Minutes face: Appears after the user selects an hour, enabling precise minute input.
C. Seconds face (optional): Can be included for use cases requiring second-level precision.

Three time picker clock faces side-by-side in Hours, Minutes, and Seconds views.

Time picker hours, minutes, and seconds clock faces

guideline
Only enable selection of seconds if they are necessary in the user’s context.

Default Time

You can set a default time, which appears as the initial value in the time input field and the time picker popover. If you don’t set it at the application level, the control defaults to the current time. Users can modify the initial value.

Time input shortcuts

When there is no mask in the input field, a specific time can be entered via the shortcuts:

After typing in the shortcut and pressing Enter, the time is automatically calculated and entered.

Three-step sequence showing a time picker input field, the shortcut value “now” entered into the field, and the calculated time displayed after the shortcut is applied.

Using shortcuts in the time picker input

Display format

You can customize the time format displayed in the input field using Unicode LDML time formats. Supported formats include full, long, medium, and short patterns, as well as specific custom patterns. These formats automatically adapt to different locales – for example, switching between 12-hour and 24-hour notation or using locale-specific separators and symbols.

Three time picker input fields showing different display formats with the same time value displayed as 2:30 PM, 02:30 PM, and 14h30.

Examples of different display formats

For more information, see UTS #35: Unicode Locale Data Markup Language.

Time zone

If the user has to set a time that is time zone-sensitive, offer a select control next to the time picker control to choose the appropriate time zone. For more information, see Formatting Time.

Localization

The time picker supports left-to-right (LTR) and right-to-left (RTL) reading directions.

Left-to-right time picker with the hours, minutes, and AM and PM fields arranged left to right above the clock face picker.

Left-to-right time picker

Right-to-left time picker with the hours, minutes, and AM and PM fields arranged right to left above the clock face picker.

Right-to-left time picker

Features

24-hour support :badge, info, large, _, SAPUI5 Only:

The time picker supports setting a value of 24:00 to represent the end of the day instead of 00:00. This is only available when using the 24-hour format and could not be used in combination with AM/PM (12-hour format). Use this option when you need to distinguish the end of the day.

Time picker input field displaying the 24-hour time value 24:00.

Time picker 24 hours

guideline
If the user has to set a time that is time zone-sensitive, offer a select control next to the time picker control to choose the appropriate time zone. For more information, see Formatting Time.

Minutes and seconds step :badge, info, large, _, SAPUI5 Only:

The time picker allows configuration of step values for both minutes and seconds. By default, time values increase or decrease by 1 unit (1 → 2 → 3). However, apps can define a custom step increment, such as 5 or 15, to skip intermediate values. For example, if the minute step is set to 5, the sequence will follow 0 → 5 → 10 → 15, and so on.

Two time picker popovers showing minute values increasing in steps of 5, with the selected values displayed as 30 and 35 on the clock face picker and input field.

Time picker with minutes step set to 5

guideline
Step values must be defined separately for minutes and seconds. Both are optional, and the default behavior, step of 1, will apply if no custom value is provided.

Current time :badge, info, large, _, SAPUI5 Only:

The time picker can include a shortcut button for setting the current time. When selected, this button automatically updates the input to reflect the exact current time, depending on the context.

The button appears inside the time selection view and offers a quick way for users to return to "now" without needing to scroll or manually adjust the fields.

Note: The current time button is optional and must be enabled by the app team based on the use case.

Time picker popover with "Current time" shortcut button displayed on the right of the AM/PM toggle in the top right hand side of the clock face popover.

Time picker with current time button

Мask in the input field :badge, info, large, _, SAPUI5 Only:

The time picker supports input masks to help users enter time in a consistent and guided format. The placeholder symbol used within the mask can be customized – for example, it can be a dash, asterisk, or other character to indicate input positions.

Time picker input field displaying a customizable input mask with dash placeholders for hours, minutes, and seconds.

Time picker with input mask

guideline
Use the mask input to restrict entries to valid characters. If the user enters a time with a valid format but an invalid value (for example, 12:60:85), the time picker displays a validation error.
You can disable the integrated mask input feature, but we strongly recommend using it. Only disable mask input if you need to make an exception for your use case (for example, if a variable-length format is required for a specific locale).

Framework Comparison

The table below summarizes the differences between SAPUI5 and SAP Web Components and lists the framework-specific patterns.

<div> <div>Feature</div> <div>SAPUI5</div> <div>SAP Web Components</div> </div> <div> <div>The time picker can be opened from another component . For more information, see the <a href="https://www.sap.com/design-system/fiori-design-web/ui-elements/time-picker#opening-the-time-picker-from-another-component">Open time picker popover from another component</a> section.</div> <div>Available</div> <div>Not available</div> </div> <div> <div>The time picker supports setting a value of 24:00 to represent the end of the day instead of 00:00. For more information, see the <a href="https://www.sap.com/design-system/fiori-design-web/ui-elements/time-picker#hour-support">24-hour support</a> section.</div> <div>Available</div> <div>Not available</div> </div> <div> <div>The time picker allows configuration of step values for both minutes and seconds. For more information, see the <a href="https://www.sap.com/design-system/fiori-design-web/ui-elements/time-picker#minutes-and-seconds-step">Minutes and seconds step</a> section.</div> <div>Available</div> <div>Not available</div> </div> <div> <div>The time picker can include a shortcut button for setting the current time. For more information, see the <a href="https://www.sap.com/design-system/fiori-design-web/ui-elements/time-picker#current-time">Current time</a> section.</div> <div>Available</div> <div>Not available</div> </div> <div> <div>The time picker supports input masks to help users enter time in a consistent and guided format. For more information, see the <a href="https://www.sap.com/design-system/fiori-design-web/ui-elements/time-picker#мask-in-the-input-field">Мask in the input field</a> section.</div> <div>Available</div> <div>Not available</div> </div>

[internal_only] To request these features for SAP Web Components, submit an InnerSource request.[/internal_only]

Guidelines

Components

Input Field
Select
Formatting Time

Implementation

SAPUI5

Time Picker
(Samples)

Time Picker
(API reference)

SAP Web Components
Time Picker

Specifications

Time Picker
(Visual design)

SAP Web UI Kit

Time Picker

Guidelines

Components

Input Field
Select
Formatting Time

Implementation

SAPUI5

Time Picker (Samples)

Time Picker (API reference)

SAP Web Components
Time Picker

UI Kit (Figma)

SAP Fiori for Web UI Kit / Time Picker