Skip to content

Extras

TimeZonePicker

Bit.BlazorUI.ExtrasTimeZoneSelectorTimeZoneSelectTzPicker

BitTimeZonePicker picks a time zone out of a searchable list that shows the offset from UTC, the place and the country of each one - for the time zone of a profile, a meeting or a report, and for the TimeZone of the date and time pickers. Value is a TimeZoneInfo or the IANA id of the time zone, whichever it is bound to; the list is the same on every runtime, Windows ids and renamed IANA ids are recognized, the visitor's own time zone can be preselected from the browser, and the whole field is keyboard and screen-reader operable.

Validation & states

Validation inside and outside an EditForm, disabled and read-only fields, the borderless and underlined variants, and placing and sizing the list.

Validation

Inside an EditForm the data annotations validate the bound time zone and the field gets aria-invalid; NoValidate opts out. Outside a form, Invalid marks the field and ErrorMessage (or ErrorMessageTemplate) also writes the reason under it, referenced by aria-describedby and announced when it appears.

ShowValidationMessage shows the messages of the form under the field, where ErrorMessage goes, so the form below needs no ValidationMessage component. The field is described by them through aria-describedby, so they are read out when it takes the focus, and an ErrorMessage of the app's own wins the place while it is set. They are not announced as they appear: a submit validates every field at once, and a message from each of them read out in a row would bury the form under its own errors. A BitParams holding a BitTimeZonePickerParams with ShowValidationMessage turns it on for every time zone picker inside it.

We have no office there yet.
Pick the time zone of one of our offices.
We have no office there yet.​


Disabled & ReadOnly

Disabled dims the field and takes it out of the tab order. ReadOnly keeps it focusable and its time zone readable while refusing to open the list; the field drops its caret.

Variants

NoBorder removes the frame, and Underlined keeps only a bottom rule that thickens on focus. Background and Border take the fill and the frame from the neutral color kinds, for a field on a surface other than the primary one.


Callout

DropDirection (TopAndBottom by default, or All) and MaxHeight place and size the list. The arrow keys wrap at its ends unless NoWrapNavigation is set; Home, End, Page Up and Page Down move through it too, and Escape or Alt+Up close it. Responsive turns it into a full-height side panel on small screens, with the Label and a close button (ResponsiveCloseIconName, ResponsiveCloseButtonAriaLabel) - narrow the window to see it.

Feedback

Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.