The Time Picker allows a user to choose a time by typing into the field, or by selecting value from the dropdown.
<State>
{([time, setTime])=>(
<Form.TimePicker
label="Time"
description="08:00 АM to 05:00 PM"
min="08:00 АM"
max="05:00 PM"
onChange={setTime}
value={time}
/>
)}
</State>
Dropdown
If Time Picker's field is in focus, a dropdown to be shown with a list of availiable options to pick from.
Options are filtered by step prop, but any intermediate value is still allowed to pick by typing.
Closest value, based on user's entry, to be highlighted in a dropdown. Dropdown behavior may be disabled with disableDropdown prop.
<State>
{([time, setTime])=>(
<Stackspacing={4}className="m-b-1">
<Stack.Itemfill>
<Form.TimePicker
label="Time"
onChange={setTime}
value={time}
/>
</Stack.Item>
<Stack.Itemfill>
<Form.TimePicker
label="Time (dropdown is disabled, type in a value)"
disableDropdown
onChange={setTime}
value={time}
/>
</Stack.Item>
</Stack>
)}
</State>
Time Range
Minimal and maximal time to be picked might be set with min and max props. Default time range is 12:00 АM to 23:59 PM.