Pickers
CircularTimePicker
Bit.BlazorUI
A BitCircularTimePicker picks a single time from an analog clock dial: an hour ring the pointer snaps to, then a minute ring and an optional second ring, with an AM/PM pair in 12-hour mode. It can be driven with a pointer or entirely from the keyboard, restricted to a range or a step, edited as text, laid out portrait or landscape, and rendered either inline or in a callout that becomes a sheet on small screens.
Appearance & templates
How the picker looks: read-only pickers, the field's border and icon, the label, icon and callout templates, and the landscape and responsive layouts.
ReadOnly
ReadOnly shows the value and lets the callout open, but nothing on the dial can be moved: the
pointer, the arrow keys, the AM/PM pair and the action buttons all stop short of a change. Unlike a
disabled picker it stays in the tab order and keeps being announced, so the value can still be read out.
What does not change the value still works: the toolbar parts switch the dial between the hours, the
minutes and the seconds, and the close button, Escape and a click outside close the callout. The field
stays read-only even with AllowTextInput, the dial and the field are marked
aria-readonly, and the time is still posted with the form and validated like any other.
Select hour
131415161718192021222300010203040506070809101112
Select hour
131415161718192021222300010203040506070809101112
Select hour
131415161718192021222300010203040506070809101112
Appearance
Underlined trades the box of the field for a single rule under it, HasBorder is on by
default and set to false takes the box away altogether - for a picker that sits inside a container of
its own - and IconPlacement moves the clock glyph to the leading edge.
IconPlacement honours Start and End (the default) only; any other placement leaves
the icon at the end. Both follow the reading direction, so Start is the right-hand side of a
right-to-left picker. These parameters style the field alone: a standalone picker has no field, and the
callout looks the same whichever of them is set. The border and the icon take the error color while the
field has a validation message.
Select hour
131415161718192021222300010203040506070809101112
Select hour
131415161718192021222300010203040506070809101112
Select hour
131415161718192021222300010203040506070809101112
Templates
LabelTemplate and IconTemplate replace the label and the trailing glyph with arbitrary
markup. The first picker below drives its callout from a button inside its own label, through the public
OpenCallout and DismissCallout methods of the component.
CalloutHeaderTemplate and CalloutFooterTemplate add arbitrary markup above and below the
dial inside the callout itself.
For the glyph, IconTemplate wins over Icon, which wins over IconName. A label
template is still the label of the field, so clicking it focuses the field (or, standalone, the dial,
which is then named by the template's text); give the picker an AriaLabel where the template has
no readable text. The header and footer sit inside the dialog and its focus cycle, so whatever they hold
can be reached with Tab, and with a header the close button sits in its corner instead of over the
toolbar. They are
rendered on a standalone picker as well, and styled through the CalloutHeader and
CalloutFooter slots of Styles and Classes.
Select hour
131415161718192021222300010203040506070809101112
Select hour
131415161718192021222300010203040506070809101112
Pick a time
Select hour
131415161718192021222300010203040506070809101112
Layout
Two parameters answer the space the picker has, and the small breakpoint is where one hands over to the
other. Landscape puts the toolbar down the leading edge instead of above the clock, stacking the
parts of the time in a column - roughly half the height for a picker with width to spare - and takes
effect from that breakpoint up. Responsive takes over below it, turning the callout into a sheet
anchored to the top of the screen that can be swiped away upwards. The Body slot of Styles
and Classes reaches the column the toolbar is set beside: the clock, the AM/PM pair when
AmPmInClock puts it there, and the row of actions.
Landscape works on a standalone picker as well as in the callout, and below the small breakpoint
it falls back to the portrait layout. Responsive only concerns the callout, so a standalone
picker ignores it, and on a screen wider than the breakpoint it changes nothing. Both are off by
default. The size of the clock itself is the job of Size and the
--bit-CircularTimePicker-clock-size variable (see
Size).
Select hour
131415161718192021222300010203040506070809101112
Select hour
123456789101112
Select hour
131415161718192021222300010203040506070809101112
Select hour
131415161718192021222300010203040506070809101112
Feedback
Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.