useTimeFieldState

Provides state management for a time field component. A time field allows users to enter and edit time values using a keyboard. Each part of a time value is displayed in an individually editable segment.

installyarn add react-stately
version3.41.0
usageimport {useTimeFieldState} from 'react-stately'

API#


useTimeFieldState<T extends TimeValue = TimeValue>( (props: TimeFieldStateOptions<T> )): TimeFieldState

Interface#


NameTypeDescription
timeValueTimeThe current time value.

Example#


See the docs for useTimeField in react-aria for an example of useTimeFieldState.