--- title: TimePicker description: >- The `TimePicker` component allows merchants to select a specific time using an interactive picker interface. Use it to provide visual time selection for improved user experience and reduced input errors. `TimePicker` offers a more visual and touch-friendly alternative to text-based time input, making time selection faster and more accurate. The picker interface provides an intuitive way to select hours and minutes through an interactive interface. api_version: 2024-07 api_name: pos-ui-extensions source_url: html: >- https://shopify.dev/docs/api/pos-ui-extensions/2024-07/ui-components/forms/timepicker md: >- https://shopify.dev/docs/api/pos-ui-extensions/2024-07/ui-components/forms/timepicker.md --- # Time​Picker The `TimePicker` component allows merchants to select a specific time using an interactive picker interface. Use it to provide visual time selection for improved user experience and reduced input errors. `TimePicker` offers a more visual and touch-friendly alternative to text-based time input, making time selection faster and more accurate. The picker interface provides an intuitive way to select hours and minutes through an interactive interface. ## Properties Configure the following properties on the `TimePicker` component. * visibleState \[boolean, (visible: boolean) => void] required A tuple that controls the visible state of the picker and provides a callback to set visibility to false when the dialog closes. The first element is the current visibility state, and the second is a setter function. * inputMode 'inline' | 'spinner' Default: 'inline' The display mode for the time picker. * `inline`: A clock-style interface that displays an analog or digital clock where users can tap to select specific times. Provides visual context about time relationships. Only available on Android devices—iOS always uses spinner mode. * `spinner`: A spinner-style selector with scrollable columns for hours, minutes, and optionally seconds. Offers a more compact interface suitable for all devices and is the only mode supported on iOS. * is24Hour boolean Default: false Whether the clock displays in 24-hour format instead of 12-hour format. This property only affects Android devices. * onChange (selected: string) => void A callback for changes. * selected string Default: The current time. The currently selected time value. Defaults to the current time when not specified. ### Examples * #### Select a time with a picker ##### Description Enable time selection using a visual picker interface for improved accuracy. This example demonstrates a TimePicker that provides an intuitive way to select hours and minutes through a touch-friendly interface, reducing input errors and speeding up time selection. ##### React ```tsx import React, {useState} from 'react'; import { Button, TimePicker, Screen, Text, reactExtension, } from '@shopify/ui-extensions-react/point-of-sale'; const SmartGridModal = () => { const [date, setDate] = useState( new Date().toDateString(), ); const visibleState = useState(false); return ( Selected date: {date}