Skip to content

TimeInput

Props

API reference for TimeInput. For usage examples, see the React tab.

NameTypeDefault
childrenChildrenOrFunction<DateFieldRenderProps>

The children of the component. A function may be provided to alter the children based on component state.

descriptionstring

Adds a description to the input

granularity"hour" | "minute" | "second"'minute'

Determines the smallest unit that is displayed in the time picker.

hideTimeZoneboolean

Whether to hide the time zone abbreviation.

hourCycle12 | 24

Whether to display the time in 12 or 24 hour format. By default, this is determined by the user's locale.

isDisabledboolean

Whether the input is disabled.

isInvalidboolean

Whether the input value is invalid.

isReadOnlyboolean

Whether the input can be selected but not changed by the user.

isRequiredboolean

Whether user input is required on the input before form submission.

labelstring

Adds a label to the input

maxValueTimeValue | null

The maximum allowed time that a user may select.

minValueTimeValue | null

The minimum allowed time that a user may select.

placeholderValueTimeValue

A placeholder time that influences the format of the placeholder shown when no value is selected. Defaults to 12:00 AM or 00:00 depending on the hour cycle.

shouldForceLeadingZerosboolean

Whether to always show leading zeros in the hour field. By default, this is determined by the user's locale.

size"lg" | "md" | "sm"md

Controls field height, padding, and segment typography.

compactDeprecatedboolean

Use size="md" instead. This prop is a no-op.