--- 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-04 api_name: pos-ui-extensions source_url: html: >- https://shopify.dev/docs/api/pos-ui-extensions/latest/ui-components/forms/timepicker md: >- https://shopify.dev/docs/api/pos-ui-extensions/latest/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. ### Support Targets (2) ### Supported targets * [pos.​home.​modal.​render](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/targets/home-screen#home-screen-action-modal-) * [pos.​purchase.​post.​action.​render](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/targets/post-purchase#post-purchase-action-modal-) #### Use cases * **Visual selection:** Provide visual time selection where touch interaction is preferred. * **Quick selection:** Enable quick time selection for business hours or delivery windows. * **Touch-optimized:** Support touch-optimized time input where tapping is more efficient. * **Modal pickers:** Implement modal-style time pickers that can be shown or hidden programmatically. ## Examples ### Select time with an interactive picker Provide a visual time selection interface using TimePicker. This example shows how to display a time picker dialog with a button trigger, allowing users to select time using an interactive spinner or clock interface with 12-hour or 24-hour formats. ## Select time with an interactive picker ![](https://cdn.shopify.com/shopifycloud/shopify-dev/development/assets/assets/images/templated-apis-screenshots/pos-ui-extensions/2024-04/time-picker-default-DqbGsgiX.png) ### Examples * #### Select time with an interactive picker ##### Description Provide a visual time selection interface using TimePicker. This example shows how to display a time picker dialog with a button trigger, allowing users to select time using an interactive spinner or clock interface with 12-hour or 24-hour formats. ##### 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}