Time picker
Pick an hour and minute on a clock dial or by typing, 12- or 24-hour.
import { TimePicker, TimePickerModeToggle, useTimePickerRoom } from '@windmorph/react';Purpose
The time picker lets someone choose an hour and minute on a clock dial or by typing in input mode, with an AM / PM selector on a 12-hour clock. It renders just the picker content; wrap it in a PickerDialog for the modal form.
Its value is an @internationalized/date Time, controlled (value / onChange) or uncontrolled (defaultValue). The hour cycle defaults to the locale's (a LocaleProvider's, or the browser's language without one); set hourCycle to 12 or 24 to force one. The hour shows two digits on both clocks ("02"), as Compose's does. Tapping an hour on the dial turns the hand to it and shows it for a moment before the minutes.
When not to use
For a rough time of day, a Select of presets may be simpler than a clock dial.
See also
- Time picker on m3.material.io: Material's own guidelines, with anatomy and specs.
- Date picker: Pick a single date or a range on a month grid or by typing, docked below a field or in a dialog.
- Picker dialog: The modal form of a date or time picker, with confirm, dismiss and mode-toggle slots.