Time Picker
The time picker provides a modal allowing the selection or input of a time.
Preview
Usage
Live Example
View an interactive Expo snack.
Props
animationType
Type: 'slide' | 'fade' | 'none' | undefined
The animation used when opening the modal. Defaults to 'none'.
cancelLabel
Type: string | undefined
Dismiss button label. Defaults to 'Cancel'.
clockIcon
Type: string | undefined
Icon used to switch back to the clock face. Defaults to 'clock-outline'. Pass a name from MaterialCommunityIcons.
confirmLabel
Type: string | undefined
Confirm button label. Defaults to 'Ok'.
defaultInputType
Type: 'picker' | 'keyboard' | undefined
Initial input mode. Defaults to 'picker' (clock face).
hours
Type: number | undefined
Initial hours value. Defaults to the current hour.
inputFontSize
Type: number | undefined
Font size of the time input. Defaults to 57. Useful when using a custom font.
keyboardIcon
Type: string | undefined
Icon used to switch to keyboard input. Defaults to 'keyboard-outline'. Pass a name from MaterialCommunityIcons.
label
Type: string | undefined
Header label. Defaults to 'Select time' (or 'Enter time' when using keyboard input with no label).
locale
Type: string | undefined
Locale used for time formatting (for example 'en' or 'de').
minutes
Type: number | undefined
Initial minutes value. Defaults to the current minutes.
onConfirm (Required)
Type: (params: { hours: number, minutes: number }) => void
Called when the user confirms the selected time.
onDismiss (Required)
Type: () => void
Called when the modal is dismissed.
uppercase
Type: boolean | undefined
Whether labels and action buttons are uppercased. Defaults to false.
use24HourClock
Type: boolean | undefined
When set, forces 24-hour or 12-hour display. Defaults to the system clock preference.
visible (Required)
Type: boolean
Whether the modal is shown.