TimeInput
Capture time or time range from user
Import
Source
Docs
Package
Usage
TimeInput component:
:
TimeRangeInput component (supports the same props as TimeInput component):
:
:
Controlled
With seconds
To add seconds set withSeconds
prop:
:
:
12 hours format
:
Input props
Component supports all props from Input and InputWrapper components:
:
Radius
xs
sm
md
lg
xl
Size
xs
sm
md
lg
xl
With icon
You can use any React node as icon:
:
Invalid state and error
:
:
It is not a valid time
Disabled state
:
:
Get input ref
You can get hours input ref with ref
prop:
Accessibility
Provide hours, minutes and seconds labels to make inputs visible to screen reader: