enes

Time Picker AI

The Time Picker lets users select a time from carousel-style hour, minute and second columns. It supports a 24-hour clock or a 12-hour clock with an AM/PM column, and any column can be hidden individually.

Usage

<script>
	import { TimePicker } from 'fluentui-svelte';

	let value = $state('');
</script>

<TimePicker bind:value format={12} />

Clock Format

Use the format prop to choose between a 24-hour clock and a 12-hour clock with an AM/PM column.

Hiding Columns

Use hideHours, hideMinutes or hideSeconds to hide individual columns. By default the seconds column is shown.

Component Props

NameTypeDefaultDescription
value bindablestring''Selected time as 24h `HH:mm` or `HH:mm:ss` (matches `<input type="time">`).
format12 | 2424Clock format: `24` (00-23) or `12` (01-12 with an AM/PM column).
open bindablebooleanfalseControls the open state of the picker.
hideHoursbooleanfalseRemoves the hour column.
hideMinutesbooleanfalseRemoves the minute column.
hideSecondsbooleanfalseRemoves the second column.
element bindableHTMLButtonElementThe DOM reference of the trigger button.
wrapperRef bindableHTMLDivElementThe DOM reference of the element wrapping the trigger and its input.
wrapperAttributesHTMLAttributesThe attributes to spread on the wrapper element.
inputElement bindableHTMLInputElementThe DOM reference of the underlying input element.
inputPropsHTMLInputAttributesHTML attributes for the underlying input element. Give it a `name` to submit the value with a form.
popupLabelstring'Choose a time'The accessible name of the popup, which is announced as a dialog.
Element Attributes (button)