Props API (Reference)

The TimePicker component offers a variety of props to control its behavior, appearance, and returned values. Below is a detailed breakdown of each prop and its default value.

PropTypeDefaultDescription
showSecondsbooleanfalseWhether to display and allow selection of seconds.
is12HourFormatbooleantrueSwitch between 12-hour and 24-hour formats.
showAMPMbooleantrueShow AM/PM selection when in 12-hour format.
showButtonsbooleantrueShow Cancel and OK buttons at the bottom of the dropdown.
align"bottom" | "top" | "left" | "right""bottom"Alignment of the dropdown relative to the input.
onTimeChange(time: string, isValid: boolean) => voidundefinedCallback fired when the selected time changes.
placeholderstringauto-generatedCustom placeholder text for the input.
valuestring | number | Date | nullundefinedControlled value of the time picker.
returnType"string" | "number" | "Date"auto-detectedFormat of the returned value.
setValue(value: any) => voidvalue => valueSetter for the controlled value.
iconReactNode<ClockIcon />Custom icon to display inside the input.
cancelButtonTextstring"Cancel"Text for the Cancel button.
confirmButtonTextstring"OK"Text for the OK button.
idstring"arc_timepicker"Unique ID for the input element.
classNamestring""Custom CSS classes for the wrapper.
classNamesobjectsee belowCustom class names for internal elements (wrapper, input, lists, buttons, etc.).

The classNames prop accepts an object with the following keys: wrapper, inputWrapper, input, icon, listsMainWrapper, listsWrapper, lists, list, listSelected, buttons, button, buttonCancel, buttonConfirm — each key lets you override the respective element’s styling.