Skip to content

TimePicker

<ts-time-picker> vv0.6.3

The ts-time-picker component.

Open in Storybook for interactive demos.

<ts-time-picker format="24" size="md" step="1"></ts-time-picker>
PropertyAttributeTypeDefaultDescription
disableddisabledbooleanfalseRenders the time picker as disabled.
errorerrorstring | undefinedError message — renders the input in an error state.
formatformat"12" | "24"'24'Time display format: 12-hour or 24-hour clock.
helpTexthelp-textstring | undefinedHelp text displayed below the input.
labellabelstring | undefinedLabel text displayed above the input.
namenamestring | undefinedName attribute for form submission.
requiredrequiredbooleanfalseMakes the time picker required.
showSecondsshow-secondsbooleanfalseWhether to show the seconds segment.
sizesize"lg" | "md" | "sm" | "xl" | "xs"'md'The time picker’s size.
stepstepnumber1Minutes increment step.
valuevaluestring | undefinedThe time value in “HH:mm” or “HH:mm:ss” format.
EventDetailBubblesComposedDescription
tsBlurvoidYesYesEmitted when the time picker loses focus.
tsChange\{ value: string; \}YesYesEmitted when the time value changes.
tsFocusvoidYesYesEmitted when the time picker gains focus.

Use ::part() to style internal elements:

PartDescription
baseThe outer wrapper.
error-textThe error message wrapper.
help-textThe help text wrapper.
labelThe label element.
periodThe AM/PM toggle button.
segmentA time segment input.
separatorThe colon separator between segments.
ts-time-picker::part(base) {
/* your custom styles */
}
<ts-time-picker format="24" size="md" step="1"></ts-time-picker>
import { TsTimePicker } from '@tessera-ui/react';
<TsTimePicker format="24" size="md"></TsTimePicker>