Skip to main content

TimeSelect

Storybook

Go to Story

TimeSelectValue

Defined in: src/components/TimeSelect/TimeSelect.tsx:23

Properties

PropertyTypeDefined in
hoursnumbersrc/components/TimeSelect/TimeSelect.tsx:24
minutes0 | 30src/components/TimeSelect/TimeSelect.tsx:25

TimeSelectProps

Defined in: src/components/TimeSelect/TimeSelect.tsx:28

Extends

  • Omit<ComponentProps<typeof Select>, "value" | "onValueChange" | "children">

Properties

PropertyTypeDescriptionOverridesInherited fromDefined in
defaultValue?stringDefault selected value for uncontrolled usage.-Omit.defaultValuesrc/components/Select/Select.tsx:60
search?| boolean | { placeholder?: string; emptyMessage?: string; }Enable or disable the search input. Accepts three possible values: - true: shows a search input with default placeholder and empty message. - false: disables the search input. - object: allows customizing the placeholder and emptyMessage. Default false-Omit.searchsrc/components/Select/Select.tsx:74
create?boolean | CreatePropEnable creation of new options. Accepts three possible values: - true: enables the create option with default behavior. - false: disables the create option. - object: allows customizing via onCreateOption callback and render function. Default false-Omit.createsrc/components/Select/Select.tsx:83
formatValue?(value) => ReactNodeFunction to format how value without a label appears when selected in the trigger and select options. Usually, it's useful when value is created or option no longer exists in the list.-Omit.formatValuesrc/components/Select/Select.tsx:91
disabled?boolean--Omit.disabledsrc/components/Select/Select.tsx:92
id?stringHTML id attribute forwarded to SelectTrigger. Useful for associating a label with the select trigger via htmlFor.Omit.id-src/components/TimeSelect/TimeSelect.tsx:33
value?TimeSelectValue | null---src/components/TimeSelect/TimeSelect.tsx:34
onChange(value) => void---src/components/TimeSelect/TimeSelect.tsx:35
placeholder?string---src/components/TimeSelect/TimeSelect.tsx:36
className?string---src/components/TimeSelect/TimeSelect.tsx:37

TimeSelect()

function TimeSelect(__namedParameters): Element;

Defined in: src/components/TimeSelect/TimeSelect.tsx:87

A time picker component that renders a Select dropdown with 48 half-hour time slots covering the full 24-hour day. Labels are formatted using locale-aware time formatting.

Parameters

ParameterType
__namedParametersTimeSelectProps

Returns

Element

Example

const [time, setTime] = useState<TimeSelectValue | null>(null);

<TimeSelect
value={time}
onChange={setTime}
placeholder="Select time"
/>