API reference: @salmonui/calendars/time-picker
TimePickerPropsinterface
import type { TimePickerProps } from '@salmonui/calendars/time-picker';interface TimePickerProps extends PickerFieldProps {
readonly value?: TimeInput | null | undefined;
readonly defaultValue?: TimeInput | null | undefined;
readonly onValueChange?: ((value: PlainTime | null, details: TimePickerValueChangeDetails) => void) | undefined;
readonly step?: number | undefined;
readonly min?: TimeInput | null | undefined;
readonly max?: TimeInput | null | undefined;
readonly isTimeDisabled?: ((time: PlainTime) => boolean) | undefined;
readonly granularity?: 'hour' | 'minute' | 'second' | undefined;
readonly format?: DateFormat | undefined;
readonly placeholderValue?: TimeInput | null | undefined;
readonly renderOption?: ((ctx: TimeOptionContext) => ReactNode) | undefined;
readonly localeText?: Partial<TimePickerLocaleText> | undefined;
readonly ref?: Ref<PickerHandle> | undefined;
}
| Name | Signature | Description |
|---|---|---|
openoptionalinherited | open?: boolean; | |
defaultOpenoptionalinherited | defaultOpen?: boolean; | |
onOpenChangeoptionalinherited | onOpenChange?: ((open: boolean, details: PickerOpenChangeDetails) => void); | |
popupModeoptionalinherited | popupMode?: PopupMode; | |
disabledoptionalinherited | disabled?: boolean; | |
readOnlyoptionalinherited | readOnly?: boolean; | |
valueoptional | readonly value?: TimeInput | null | undefined; | |
defaultValueoptional | readonly defaultValue?: TimeInput | null | undefined; | |
onValueChangeoptional | readonly onValueChange?: ((value: PlainTime | null, details: TimePickerValueChangeDetails) => void) | undefined; | |
stepoptional | readonly step?: number | undefined; | Minutes between list options (default 30). |
minoptional | readonly min?: TimeInput | null | undefined; | |
maxoptional | readonly max?: TimeInput | null | undefined; | |
isTimeDisabledoptional | readonly isTimeDisabled?: ((time: PlainTime) => boolean) | undefined; | Disabled times: skipped in the list, invalid when typed. |
granularityoptional | readonly granularity?: 'hour' | 'minute' | 'second' | undefined; | Deepest segment (default |
formatoptional | readonly format?: DateFormat | undefined; | Display format of the field ( |
placeholderValueoptional | readonly placeholderValue?: TimeInput | null | undefined; | List position and segment seed without a value. |
renderOptionoptional | readonly renderOption?: ((ctx: TimeOptionContext) => ReactNode) | undefined; | Option content. |
localeTextoptional | readonly localeText?: Partial<TimePickerLocaleText> | undefined; | |
refoptional | readonly ref?: Ref<PickerHandle> | undefined; | |
openOnFocusoptionalinherited | openOnFocus?: boolean; | Opens the popup when focus enters the field. |
editableoptionalinherited | editable?: boolean; |
|
clearableoptionalinherited | clearable?: boolean; | Renders a clear button. |
onClearoptionalinherited | onClear?: (() => void); | |
strictoptionalinherited | strict?: boolean; | Out-of-range values move to the nearest bound and disabled or unparsable input reverts on blur. |
requiredoptionalinherited | required?: boolean; | |
invalidoptionalinherited | invalid?: boolean; | |
labeloptionalinherited | label?: ReactNode; | |
descriptionoptionalinherited | description?: ReactNode; | |
errorMessageoptionalinherited | errorMessage?: ReactNode; | |
placeholderoptionalinherited | placeholder?: string; | Watermark shown while empty and not focused. |
nameoptionalinherited | name?: string; | |
formoptionalinherited | form?: string; | |
autoFocusoptionalinherited | autoFocus?: boolean; | |
onFocusoptionalinherited | onFocus?: ((event: FocusEvent<Element, Element>) => void); | Focus entered the field group (once). |
onBluroptionalinherited | onBlur?: ((event: FocusEvent<Element, Element>) => void); | Focus left the field group and its popup (once). |
onInvalidoptionalinherited | onInvalid?: (() => void); | The form value input failed constraint validation. |
localeoptionalinherited | locale?: string; | BCP 47 locale; default |
timeZoneoptionalinherited | timeZone?: string; | IANA time zone for instant values ( |
hourCycleoptionalinherited | hourCycle?: "h12" | "h23"; | |
sizeoptionalinherited | size?: "lg" | "md" | "sm"; | Control size: |
idoptionalinherited | id?: string; | |
classNameoptionalinherited | className?: string; | |
styleoptionalinherited | style?: CSSProperties; | |
aria-labeloptionalinherited | aria-label?: string; | |
aria-labelledbyoptionalinherited | aria-labelledby?: string; | |
aria-describedbyoptionalinherited | aria-describedby?: string; |