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.

Customization

Defaults through BitParams, colors, external icons, sizes, styling every part of the picker, and right-to-left layouts.

Cascading parameters

BitParams hands a BitTimeZonePickerParams to every time zone picker under it - the time zones an app offers, whether the visitor's own is detected, its look and its translated texts, set once, whatever each picker is bound to. A picker keeps any parameter it sets itself. What belongs to one field only (Value, DefaultValue, IsOpen, Name, Invalid, ErrorMessage and the events) is not cascaded.


Color

Color paints the frame and the focus ring in one of the general colors - a semantic one or a neutral family. A Border kind, when set, takes the frame back and leaves Color the ring.

External Icons

ResponsiveCloseIcon takes the icon of the close button of the responsive panel from any CSS-class based library (FontAwesome, Bootstrap Icons) as raw classes or through the BitIconInfo helpers, and wins over ResponsiveCloseIconName. Reference the library's stylesheet in your app, and narrow the window to see it.

Size

Size scales the height, padding, text and list rows together.

Style & Class

The public --bit-TimeZonePicker-* custom properties (see the CSS variables table) re-skin the field without a selector: on :root for the whole app, on an ancestor for the pickers inside it, or in one picker's Style. The time zone list is moved to the end of the body while it is open, yet it keeps inheriting from the field and every ancestor of it, so a variable set in any of those places re-skins the list as well. They restyle the default, not a choice: an explicit Color, Background, Border or Size wins over the variables for what it sets. Style and Class reach the root, Styles and Classes every part by name.

CSS variables on one picker (open its list too):

CSS variables on an ancestor (open its list too):

Style, Class, Styles and Classes:

RTL

Dir="BitDir.Rtl" mirrors the field, the callout and the responsive panel.

Feedback

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