Skip to content

Pickers

DatePicker

Bit.BlazorUI

A BitDatePicker offers a drop-down control that's optimized for picking a single date from a calendar view, where contextual information like the day of the week or the fullness of the calendar is important. It provides day, month, and year views, an optional time picker, and flexible day rules such as min/max dates and disabled or highlighted dates. It works with any culture and time zone, including right-to-left and non-Gregorian calendars, accepts typed input, is customizable through templates, and is fully keyboard accessible following the WAI-ARIA combobox and grid patterns.

Usage

Every example is live. Open its code to see exactly what produced the component running underneath.

Basic

The essential BitDatePicker configurations: the default picker, the disabled and required states, a placeholder, week numbers, the highlighting of the current and the selected month, the built-in time picker, the clear and close buttons, keeping the callout open after a selection (AutoClose), clearing the value by selecting the selected day again (AllowDeselect), the date the calendar opens on when there is no value yet (StartingValue), and overriding the current date with Today.

























Min & Max

Limit the selectable dates using MinDate and MaxDate. Days outside of the range are disabled, the month, year, and year-range navigation stops at the boundaries, and a date typed into the input outside of the range (when AllowTextInput is enabled) is reported as a validation error. The DisablePast and DisableFuture shortcuts bound the range by today, exactly as a MinDate or MaxDate of today would, and combine with them (the narrower bound wins).


Min: Now.AddDays(-5)
Max: Now.AddDays(+5)


Min: Now.AddMonths(-2)
Max: Now.AddMonths(+1)


Min: Now.AddYears(-5)
Max: Now.AddYears(+1)




Disabled dates

Disable specific dates beyond MinDate and MaxDate: pass an explicit list using DisabledDates, disable whole days of the week using DisabledDaysOfWeek (e.g. weekends), or provide any custom rule using the IsDateDisabled function. Disabled dates cannot be selected and are skipped by the keyboard navigation.





Highlighted dates

Mark important dates using HighlightedDates, or provide custom CSS classes for any day using the GetDayClass function, which receives each rendered day and returns the classes to add to it. The highlight of today's day can also be turned off using HighlightToday; the day keeps its accessibility semantics and only loses the visual accent.





Week configuration

Customize how the weeks are rendered: override the first day of the week using FirstDayOfWeek, choose the week numbering rule using WeekNumberRule (ISO 8601 is the FirstFourDayWeek rule with Monday as the first day of the week), hide the days of the adjacent months using ShowOutsideDays, and keep the height of the calendar fixed using FixedWeeks.







MonthPicker

Control the month and year picker that sits beside the day picker: hide it using IsMonthPickerVisible, or render it as an overlay on top of the day picker (reached through the month title button) using ShowMonthPickerAsOverlay. On screens too narrow for both panels the overlay mode is turned on automatically.






TimePicker

Enable the built-in time picker using ShowTimePicker to let users pick the time of day along with the date. Switch between the 24-hour and the 12-hour clock using TimeFormat, render the time picker as an overlay (reached through the clock button) using ShowTimePickerAsOverlay, and hide the now button using ShowNowButton. While the time picker is on screen, selecting a day keeps the callout open so the time can be set as well.

Selected DateTime:






Hour/Minute step

Customize the increment/decrement step of the hour and minute buttons of the time picker using HourStep and MinuteStep.


Date format

Applications can customize how dates are formatted and parsed using DateFormat. The same pattern is used to render the value in the input and to parse what the user types, so a custom format takes effect in both directions. Without it, the short date pattern of the culture is used (plus the time pattern when the time picker is enabled).

Text input

AllowTextInput lets the date be typed into the input instead of being picked from the calendar. The typed text has to match the DateFormat of the component; anything else, or a date outside of the Min/Max range, is reported as a validation error (customizable through InvalidErrorMessage and OutOfRangeErrorMessage).


Binding

Two-way bind the selected date using @bind-Value to keep the model and the picker in sync, or, in uncontrolled mode, set the initial date using DefaultValue and follow the changes through the OnChange callback.


Selected date: 1/17/2020 12:00:00 AM +02:00




Changed date: -

Culture

By default, BitDatePicker uses the current culture of the app, but any custom CultureInfo can be provided to fully localize the calendar: the month and day names, the first day of the week, the date formats, and even non-Gregorian calendars such as the Persian calendar.
You also can use our CultureInfoHelper class or check its code to see how to create a custom culture.



TimeZone

Specifies the time zone used to interpret and display the selected date and time. Everything the calendar shows - the highlighted day, the month it opens on, and the time in the time picker - is resolved in that zone.
Remember that using this feature across different runtimes needs more investigation; for example, different time zone data is available based on the OS the code is running on, or different settings enabled for the project (like InvariantTimezone in the project file, more info).


Default (local TimeZone):


Selected date:




"Dateline Standard Time" TimeZone:


Selected date:

Standalone

The Standalone mode renders the calendar inline, without the input and the callout around it, which suits a form or a panel that has room for the calendar itself. The value still takes part in the surrounding EditForm through a hidden input.

August 2026
S
M
T
W
T
F
S


August 2026
S
M
T
W
T
F
S


August 2026
S
M
T
W
T
F
S
30
31
32
33
34
35


August 2026
S
M
T
W
T
F
S


S
M
T
W
T
F
S
:

Mode

The MonthPicker mode turns the component into a month and year picker: the day picker is not rendered, the input shows the year/month pattern of the culture, and picking a month selects its first day (or the first day the Min/Max range allows).




Selected Date: None






ReadOnly

The ReadOnly parameter shows the value and lets the calendar be browsed, but refuses every change to it: the days, the time picker, and the clear button are all inert, and the input cannot be typed into even where AllowTextInput is set.





Selected date 8/27/2026
August 2026
S
M
T
W
T
F
S


Selected date 8/27/2026 11:03
S
M
T
W
T
F
S
:

Templates

Take full control of the rendering using LabelTemplate for the label, IconTemplate for the icon of the input, and DayCellTemplate, MonthCellTemplate, and YearCellTemplate for the content of the day, month, and year cells. Arbitrary content can also be rendered above and below the pickers of the callout using CalloutHeaderTemplate and CalloutFooterTemplate - the footer is a natural place for preset buttons that set the value from the code.













Responsive

The Responsive mode turns the callout into a full-width panel on small screens, sliding in from the top of the viewport and dismissible with a swipe, which gives the calendar the room it needs on a phone. Resize the window to see it in action.

Events

OnSelectDate reports every date the user picks, OnMonthChange reports the first day of the month the calendar navigates to (through the nav buttons, the month/year pickers, GoToToday, or the keyboard), which is ideal for lazy-loading the data of the visible month, OnClick, OnFocusIn, and OnFocusOut report the interactions with the input, OnClear reports the value getting cleared by the clear button, and OnOpen and OnClose report the callout opening and closing however it happened - a click, the keyboard, or IsOpen set from code.


Selected date: -
Displayed month: -



Clicked: 0 times
Focused in: 0 times
Focused out: 0 times
Cleared: 0 times



Opened: 0 times
Closed: 0 times

Keyboard navigation

BitDatePicker follows the WAI-ARIA combobox and grid patterns. From the input, or opens the calendar and moves the focus into the grid it opens on; Esc closes it and brings the focus back to the input. Inside the day grid:

  • / : previous/next day
  • / : same day of the previous/next week
  • Home / End: first/last day of the week
  • PageUp / PageDown: same day of the previous/next month
  • Shift+PageUp / Shift+PageDown: same day of the previous/next year
  • Enter / Space: select the focused day

The month and the year grids answer the same keys, four cells to a row: the arrows move between the cells, Home and End jump to the first and the last of them, and PageUp/PageDown move to the adjacent year (in the month grid) or to the adjacent range of years (in the year grid).

Crossing a month boundary navigates the calendar and keeps the focus on the day, switching between the pickers takes the focus along with it, and disabled days, months, and years are all skipped.



Validation

Use BitDatePicker inside an EditForm and validate the selected date with data annotations, just like any other input component. The invalid state is announced through aria-invalid and is styled on the input as well.



Programmatic control

The callout can be driven from the outside as well: two-way bind IsOpen to open and close it from the code, or call the OpenCallout and CloseCalloutAndFocus methods on a reference to the component - the first opens the callout exactly as clicking the input would, and the second closes it and hands the focus back to the input. A one-way bound IsOpen keeps the callout under the control of the application: the component reports the change but never closes on its own.


IsOpen: False

Appearance

Adapt the input to the surrounding form: Underlined replaces the box with a single underline, HasBorder removes the border altogether, IconLocation moves the calendar icon to the other side of the input, and IconName replaces it with any icon of the built-in Fluent UI set.







Color

Offering a range of specialized color variants with Primary being the default, providing visual cues for specific actions or states within your application. The color applies to the today day button, the highlighted current month, and the selected AM/PM button.

































External Icons

Use icons from external libraries like FontAwesome, Material Icons, and Bootstrap Icons with the Icon parameter.


FontAwesome:






Bootstrap:






Navigation & TimePicker Icons (FontAwesome):





Navigation Icons (Bootstrap):

Size

The Size parameter scales the input and the whole calendar - the label, the day cells, and the navigation buttons - between three sizes, with Medium being the default.





Style & Class

Customize the appearance of BitDatePicker: use Style and Class on the root element, or target every individual part of the component - the input, the callout, the day cells, the time picker - using the Styles and Classes parameters.


Component's Style & Class:





Styles & Classes:


RTL

Render BitDatePicker in right-to-left (RTL) using the Dir parameter. Providing an RTL culture (like fa-IR) enables it automatically, and the keyboard navigation of the day grid follows the direction as well.

API

Every parameter, public member, sub-class and enum this component exposes.

BitDatePicker parameters

Name Type Default value Description
AllowDeselect bool false Whether selecting the already selected date deselects it, clearing the value. The callout stays open after a deselection, so another date can be picked right away.
AllowTextInput bool false Whether or not the DatePicker allows a string date input.
AutoClose bool true Whether the DatePicker closes automatically after selecting the date. It has no effect while the time picker is shown, where the callout stays open so the time of the selected day can be set as well.
AutoFocus bool false Whether the input of the picker gets the focus as soon as it renders for the first time. A standalone picker carries its value in a hidden input nobody is meant to land on, so it has nothing to place the focus on.
CalloutAriaLabel string Calendar Aria label of the DatePicker's callout for screen readers.
CalloutFooterTemplate RenderFragment? null Custom template to render at the bottom of the DatePicker's callout, below the pickers (e.g. preset buttons that set the value from the code).
CalloutHeaderTemplate RenderFragment? null Custom template to render at the top of the DatePicker's callout, above the pickers.
CalloutHtmlAttributes Dictionary<string, object> new Dictionary<string, object>() Capture and render additional html attributes for the DatePicker's callout.
Classes BitDatePickerClassStyles null Custom CSS classes for different parts of the BitDatePicker.
ClearButtonIcon BitIconInfo? null The icon to display inside the clear button. Takes precedence over ClearButtonIconName when both are set.
ClearButtonIconName string? null The name of the clear button's icon from the built-in Fluent UI icon set.
ClearButtonTitle string Clear date The title (tooltip) and the accessible name of the clear button.
CloseButtonIcon BitIconInfo? null The icon to display inside the close button. Takes precedence over CloseButtonIconName when both are set.
CloseButtonIconName string? null The name of the close button's icon from the built-in Fluent UI icon set.
CloseButtonTitle string Close date picker The title of the close button (tooltip).
Color BitColor? null The general color of the DatePicker that applies to the today day button, the highlighted current month, and the selected AM/PM button.
ContinuousSpinDelay int 400 The delay in milliseconds before the hour/minute starts changing continuously while an increase/decrease button of the time picker is held down.
ContinuousSpinInterval int 75 The interval in milliseconds between two consecutive changes while an increase/decrease button of the time picker is held down.
Culture CultureInfo CultureInfo.CurrentUICulture CultureInfo for the DatePicker.
DateFormat string? null The format of the date in the DatePicker.
DayCellTemplate RenderFragment<DateTimeOffset>? null Custom template to render the day cells of the DatePicker.
DisabledDateErrorMessage string? null The custom validation error message for a typed value that the DatePicker does not allow to be selected, through DisabledDates, DisabledDaysOfWeek or IsDateDisabled.
DisabledDates IEnumerable<DateTimeOffset>? null The list of dates that are disabled (not selectable) in the DatePicker, in addition to MinDate and MaxDate.
DisabledDaysOfWeek IEnumerable<DayOfWeek>? null The days of the week that are disabled (not selectable) in the DatePicker (e.g. weekends).
DisableFuture bool false Disables all days after today, exactly as a MaxDate of today would. When both are set, the earlier of the two bounds wins.
DisablePast bool false Disables all days before today, exactly as a MinDate of today would. When both are set, the later of the two bounds wins.
DropDirection BitDropDirection BitDropDirection.TopAndBottom Determines the allowed drop directions of the callout.
FirstDayOfWeek DayOfWeek? null Overrides the first day of the week of the day picker. If not set, the first day of the week of the Culture is used.
FixedWeeks bool false Whether the day picker should always render six weeks, filling the extra rows with the days of the adjacent months, to keep the height of the calendar fixed while navigating between the months.
GetDayClass Func<DateTimeOffset, string?>? null Custom function to provide additional CSS classes for each day button of the DatePicker.
GoToNextMonthTitle string Go to next month The title of the Go to next month button (tooltip).
GoToNextYearRangeTitle string Next year range {0} - {1} The title of the Go to next year range button (tooltip).
GoToNextYearTitle string Go to next year {0} The title of the Go to next year button (tooltip).
GoToPrevMonthTitle string Go to previous month The title of the Go to previous month button (tooltip).
GoToPrevYearRangeTitle string Previous year range {0} - {1} The title of the Go to previous year range button (tooltip).
GoToPrevYearTitle string Go to previous year {0} The title of the Go to previous year button (tooltip).
GoToTodayIcon BitIconInfo? null The icon to display inside the GoToToday button. Takes precedence over GoToTodayIconName when both are set.
GoToTodayIconName string? null The name of the GoToToday button's icon from the built-in Fluent UI icon set.
GoToTodayTitle string Go to today The title of the GoToToday button (tooltip).
HasBorder bool true Determines if the DatePicker has a border.
HideTimePickerIcon BitIconInfo? null The icon to display inside the HideTimePicker button. Takes precedence over HideTimePickerIconName when both are set.
HideTimePickerIconName string? null The name of the HideTimePicker button's icon from the built-in Fluent UI icon set.
HideTimePickerTitle string Hide time picker The title of the HideTimePicker button (tooltip).
HighlightCurrentMonth bool false Whether the month picker should highlight the current month.
HighlightedDates IEnumerable<DateTimeOffset>? null The list of dates that are highlighted (marked) in the day picker.
HighlightSelectedMonth bool false Whether the month picker should highlight the selected month.
HighlightToday bool true Whether the day picker should highlight today's day. It only affects the visual style of the day cell; the accessibility attributes still report the day as the current date.
HourStep int 1 The step, in hours, the spin buttons move the hour by. A step greater than 1 lays a grid over the day, starting at midnight, that every hour the buttons produce sits on. A time entered as text is not held to it.
Icon BitIconInfo? null The icon to display in the DatePicker input using custom CSS classes for external icon libraries. Takes precedence over IconName when both are set.
IconLocation BitIconLocation BitIconLocation.Right Determines the location of the DatePicker's icon.
IconName string? null The name of the DatePicker's icon from the built-in Fluent UI icon set. For external icon libraries, use Icon instead.
IconTemplate RenderFragment? null Custom template for the DatePicker's icon.
InvalidErrorMessage string? null The custom validation error message for the invalid value.
IsDateDisabled Func<DateTimeOffset, bool>? null Custom function to determine if a specific date is disabled (not selectable) in the DatePicker.
IsMonthPickerVisible bool true Whether the month picker is shown next to the day picker or hidden. It has no effect in the MonthPicker mode, where the month picker is the only view.
IsOpen bool false Whether or not this DatePicker is open.
Label string? null The text of the DatePicker's label.
LabelTemplate RenderFragment? null Custom template for the DatePicker's label.
MaxDate DateTimeOffset null The maximum date allowed for the DatePicker.
MinDate DateTimeOffset? null The minimum date allowed for the DatePicker.
MinuteStep int 1 The step, in minutes, the spin buttons move the minute by. A step greater than 1 lays a grid over the hour, starting at the top of it, that every minute the buttons produce sits on - which is what turns it into a five-minute or quarter-hour picker. A time entered as text is not held to it.
Mode BitDatePickerMode BitDatePickerMode.DatePicker The selection mode of the DatePicker (DatePicker or MonthPicker).
MonthCellTemplate RenderFragment<DateTimeOffset>? null Custom template to render the month cells of the DatePicker.
MonthPickerToggleTitle string {0}, change month The title of the month picker's toggle (tooltip).
NextMonthNavIcon BitIconInfo? null The icon to display inside the next-month navigation button. Takes precedence over NextMonthNavIconName when both are set.
NextMonthNavIconName string? null The name of the next-month navigation button's icon from the built-in Fluent UI icon set.
NextYearNavIcon BitIconInfo? null The icon to display inside the next-year navigation button. Takes precedence over NextYearNavIconName when both are set.
NextYearNavIconName string? null The name of the next-year navigation button's icon from the built-in Fluent UI icon set.
NextYearRangeNavIcon BitIconInfo? null The icon to display inside the next-year-range navigation button. Takes precedence over NextYearRangeNavIconName when both are set.
NextYearRangeNavIconName string? null The name of the next-year-range navigation button's icon from the built-in Fluent UI icon set.
NowButtonIcon BitIconInfo? null The icon to display inside the now button. Takes precedence over NowButtonIconName when both are set.
NowButtonIconName string? null The name of the now button's icon from the built-in Fluent UI icon set.
NowButtonTitle string Go to now The title of the now button (tooltip).
OnClear EventCallback The callback that is called when the value gets cleared by the clear button.
OnClick EventCallback The callback for clicking on the DatePicker's input.
OnClose EventCallback Callback for when the callout is closed.
OnFocus EventCallback The callback for focusing the DatePicker's input.
OnFocusIn EventCallback The callback for when the focus moves into the DatePicker's input.
OnFocusOut EventCallback The callback for when the focus moves out of the DatePicker's input.
OnMonthChange EventCallback<DateTimeOffset> The callback for when the displayed month of the day picker changes. The argument is the first day of the newly displayed month.
OnOpen EventCallback Callback for when the callout is opened.
OnSelectDate EventCallback<DateTimeOffset?> The callback for when the user selects a date.
OutOfRangeErrorMessage string? null The custom validation error message for a typed value that falls outside of the MinDate and MaxDate range.
Placeholder string string.Empty The placeholder text of the DatePicker's input.
PrevMonthNavIcon BitIconInfo? null The icon to display inside the previous-month navigation button. Takes precedence over PrevMonthNavIconName when both are set.
PrevMonthNavIconName string? null The name of the previous-month navigation button's icon from the built-in Fluent UI icon set.
PrevYearNavIcon BitIconInfo? null The icon to display inside the previous-year navigation button. Takes precedence over PrevYearNavIconName when both are set.
PrevYearNavIconName string? null The name of the previous-year navigation button's icon from the built-in Fluent UI icon set.
PrevYearRangeNavIcon BitIconInfo? null The icon to display inside the previous-year-range navigation button. Takes precedence over PrevYearRangeNavIconName when both are set.
PrevYearRangeNavIconName string? null The name of the previous-year-range navigation button's icon from the built-in Fluent UI icon set.
Responsive bool false Enables the responsive mode in small screens.
SelectedDateAriaAtomic string Selected date {0} The text of selected date aria-atomic of the calendar.
ShowClearButton bool false Whether the clear button should be shown or not when the BitDatePicker has a value.
ShowCloseButton bool false Whether the DatePicker's close button should be shown or not.
ShowGoToToday bool true Whether the GoToToday button should be shown or not.
ShowMonthPickerAsOverlay bool false Show month picker on top of date picker when visible.
ShowNowButton bool true Whether the now button should be shown or not.
ShowOutsideDays bool true Whether the days of the previous and next months should be shown in the day picker.
ShowTimePicker bool false Whether or not render the time-picker.
ShowTimePickerAsOverlay bool false Show the time picker as an overlay on top of the date picker when visible.
ShowTimePickerIcon BitIconInfo? null The icon to display inside the ShowTimePicker button. Takes precedence over ShowTimePickerIconName when both are set.
ShowTimePickerIconName string? null The name of the ShowTimePicker button's icon from the built-in Fluent UI icon set.
ShowTimePickerTitle string Show time picker The title of the ShowTimePicker button (tooltip).
ShowWeekNumbers bool false Whether the week number (weeks 1 to 53) should be shown before each week row.
Size BitSize? null The size of the DatePicker.
Standalone bool false Whether the date-picker is rendered standalone or with the input component and callout.
StartingValue DateTimeOffset? null Specifies the date and time of the date-picker when it is opened without any selected value.
Styles BitDatePickerClassStyles null Custom CSS styles for different parts of the BitDatePicker.
TimeFormat BitTimeFormat BitTimeFormat.TwentyFourHours The time format of the time-picker, 24H or 12H.
TimePickerDecreaseHourIcon BitIconInfo? null The icon to display inside the time-picker's decrease-hour button. Takes precedence over TimePickerDecreaseHourIconName when both are set.
TimePickerDecreaseHourIconName string? null The name of the time-picker's decrease-hour button icon from the built-in Fluent UI icon set.
TimePickerDecreaseMinuteIcon BitIconInfo? null The icon to display inside the time-picker's decrease-minute button. Takes precedence over TimePickerDecreaseMinuteIconName when both are set.
TimePickerDecreaseMinuteIconName string? null The name of the time-picker's decrease-minute button icon from the built-in Fluent UI icon set.
TimePickerHourTitle string Hour The title (tooltip) and the accessible name of the time-picker's hour input.
TimePickerIncreaseHourIcon BitIconInfo? null The icon to display inside the time-picker's increase-hour button. Takes precedence over TimePickerIncreaseHourIconName when both are set.
TimePickerIncreaseHourIconName string? null The name of the time-picker's increase-hour button icon from the built-in Fluent UI icon set.
TimePickerIncreaseMinuteIcon BitIconInfo? null The icon to display inside the time-picker's increase-minute button. Takes precedence over TimePickerIncreaseMinuteIconName when both are set.
TimePickerIncreaseMinuteIconName string? null The name of the time-picker's increase-minute button icon from the built-in Fluent UI icon set.
TimePickerMinuteTitle string Minute The title (tooltip) and the accessible name of the time-picker's minute input.
TimeZone TimeZoneInfo? null TimeZone for the DatePicker.
Today DateTimeOffset? null Overrides the current date and time considered as "today" and "now" in the DatePicker (useful for testing or custom time providers).
Underlined bool false Whether or not the Text field of the DatePicker is underlined.
WeekNumberRule CalendarWeekRule? null The rule used to calculate the week numbers. Defaults to the FirstFullWeek rule.
WeekNumberTitle string Week number {0} The title of the week number (tooltip).
YearCellTemplate RenderFragment<int>? null Custom template to render the year cells of the DatePicker.
YearPickerToggleTitle string {0}, change year The title of the year picker's toggle (tooltip).
YearRangePickerToggleTitle string {0} - {1}, change month The title of the year range picker's toggle (tooltip).

BitDatePicker public members

Name Type Default value Description
OpenCallout Task Opens the callout of the DatePicker exactly as clicking its input would.
CloseCalloutAndFocus Task Closes the callout of the DatePicker and moves the focus back to its input.

BitInputBase parameters

Name Type Default value Description
DefaultValue TValue? null The default value of the input to be used in uncontrolled mode (i.e. when the Value is not bound), typically used alongside the OnChange callback.
DisplayName string? null Gets or sets the display name for this field.
InputHtmlAttributes IReadOnlyDictionary<string, object>? null Gets or sets a collection of additional attributes that will be applied to the created element.
Name string? null Gets or sets the name of the element. Allows access by name from the associated form.
NoValidate bool false Disables the validation of the input.
OnChange EventCallback<TValue?> Callback for when the input value changes.
ReadOnly bool false Makes the input read-only.
Required bool false Makes the input required.
Value TValue? null Gets or sets the value of the input. This should be used with two-way binding.

BitInputBase public members

Name Type Default value Description
InputElement ElementReference The ElementReference of the input element.
FocusAsync() () => ValueTask Gives focus to the input element.
FocusAsync(bool preventScroll) (bool preventScroll) => ValueTask Gives focus to the input element.

BitComponentBase parameters

Name Type Default value Description
AriaLabel string? null Gets or sets the accessible label for the component, used by assistive technologies.
Class string? null Gets or sets the CSS class name(s) to apply to the rendered element.
Dir BitDir? null Gets or sets the text directionality for the component's content.
ForceAnimation bool false Gets or sets a value indicating whether the component's animations play at their full duration even when reduced motion is requested.
HtmlAttributes Dictionary<string, object> new Dictionary<string, object>() Captures additional HTML attributes to be applied to the rendered element, in addition to the component's parameters.
Id string? null Gets or sets the unique identifier for the component's root element.
IsEnabled bool true Gets or sets a value indicating whether the component is enabled and can respond to user interaction.
Style string? null Gets or sets the CSS style string to apply to the rendered element.
TabIndex string? null Gets or sets the tab order index for the component when navigating with the keyboard.
Visibility BitVisibility BitVisibility.Visible Gets or sets the visibility state (visible, hidden, or collapsed) of the component.

BitComponentBase public members

Name Type Default value Description
UniqueId Guid Guid.NewGuid() Gets the readonly unique identifier for the component's root element, assigned when the component instance is constructed.
RootElement ElementReference Gets the reference to the root HTML element associated with this component.

BitDatePickerClassStyles properties

Name Type Default value Description
Root string? null Custom CSS classes/styles for the root element of the BitDatePicker.
Focused string? null Custom CSS classes/styles for the focused state of the BitDatePicker.
Label string? null Custom CSS classes/styles for the label of the BitDatePicker.
InputWrapper string? null Custom CSS classes/styles for the input wrapper of the BitDatePicker.
InputContainer string? null Custom CSS classes/styles for the input container of the BitDatePicker.
Input string? null Custom CSS classes/styles for the input of the BitDatePicker.
Icon string? null Custom CSS classes/styles for the icon of the BitDatePicker.
Overlay string? null Custom CSS classes/styles for the overlay of the BitDatePicker.
Callout string? null Custom CSS classes/styles for the callout of the BitDatePicker.
CalloutContainer string? null Custom CSS classes/styles for the callout container of the BitDatePicker.
CalloutHeader string? null Custom CSS classes/styles for the header wrapper of the callout of the BitDatePicker, rendered when a CalloutHeaderTemplate is provided.
CalloutFooter string? null Custom CSS classes/styles for the footer wrapper of the callout of the BitDatePicker, rendered when a CalloutFooterTemplate is provided.
Group string? null Custom CSS classes/styles for the group of the BitDatePicker.
DayPickerWrapper string? null Custom CSS classes/styles for the day-picker's wrapper of the BitDatePicker.
DayPickerHeader string? null Custom CSS classes/styles for the day-picker's header of the BitDatePicker.
DayPickerMonth string? null Custom CSS classes/styles for the day-picker's month of the BitDatePicker.
DayPickerNavWrapper string? null Custom CSS classes/styles for the wrapper of the day-picker's nav buttons of the BitDatePicker.
PrevMonthNavButton string? null Custom CSS classes/styles for the Go to previous month button of the BitDatePicker.
PrevMonthNavIcon string? null Custom CSS classes/styles for the Go to previous month icon of the BitDatePicker.
GoToTodayButton string? null Custom CSS classes/styles for the Go to today button of the BitDatePicker.
NowButton string? null Custom CSS classes/styles for the Go to now button of the BitDatePicker.
HideTimePickerButton string? null Custom CSS classes/styles for the hide time-picker button of the BitDatePicker.
HideTimePickerIcon string? null Custom CSS classes/styles for the hide time-picker icon of the BitDatePicker.
GoToTodayIcon string? null Custom CSS classes/styles for the Go to today icon of the BitDatePicker.
NowButtonIcon string? null Custom CSS classes/styles for the Go to now icon of the BitDatePicker.
CloseButton string? null Custom CSS classes/styles for the close button of the BitDatePicker.
CloseButtonIcon string? null Custom CSS classes/styles for the close button icon of the BitDatePicker.
NextMonthNavButton string? null Custom CSS classes/styles for the Go to next month button of the BitDatePicker.
NextMonthNavIcon string? null Custom CSS classes/styles for the Go to next month icon of the BitDatePicker.
DaysGrid string? null Custom CSS classes/styles for the grid of the days of the BitDatePicker.
DaysHeaderRow string? null Custom CSS classes/styles for the header row of the days of the BitDatePicker.
WeekNumbersHeader string? null Custom CSS classes/styles for the header of the week numbers of the BitDatePicker.
DayNameHeader string? null Custom CSS classes/styles for the header cells of the day names of the BitDatePicker.
DaysRow string? null Custom CSS classes/styles for each row of the days of the BitDatePicker.
WeekNumber string? null Custom CSS classes/styles for the week number of the BitDatePicker.
DayButton string? null Custom CSS classes/styles for each day button of the BitDatePicker.
TodayDayButton string? null Custom CSS classes/styles for today day button of the BitDatePicker.
SelectedDayButton string? null Custom CSS classes/styles for selected day button of the BitDatePicker.
HighlightedDayButton string? null Custom CSS classes/styles for the highlighted day buttons of the BitDatePicker.
TimeInputContainer string? null Custom CSS classes/styles for the time-picker's input container of the BitDatePicker.
HourInputContainer string? null Custom CSS classes/styles for the time-picker's hour input container of the BitDatePicker.
MinuteInputContainer string? null Custom CSS classes/styles for the time-picker's minute input container of the BitDatePicker.
TimePickerWrapper string? null Custom CSS classes/styles for the time-picker's wrapper of the BitDatePicker.
TimePickerHourInput string? null Custom CSS classes/styles for the time-picker's hour input of the BitDatePicker.
TimePickerHourMinuteSeparator string? null Custom CSS classes/styles for the time-picker's hour/minute separator of the BitDatePicker.
TimePickerMinuteInput string? null Custom CSS classes/styles for the time-picker's minute input of the BitDatePicker.
TimePickerIncreaseHourButton string? null Custom CSS classes/styles for the time-picker's increase hour button of the BitDatePicker.
TimePickerIncreaseHourIcon string? null Custom CSS classes/styles for the time-picker's increase hour icon of the BitDatePicker.
TimePickerDecreaseHourButton string? null Custom CSS classes/styles for the time-picker's decrease hour button of the BitDatePicker.
TimePickerDecreaseHourIcon string? null Custom CSS classes/styles for the time-picker's decrease hour icon of the BitDatePicker.
TimePickerIncreaseMinuteButton string? null Custom CSS classes/styles for the time-picker's increase minute button of the BitDatePicker.
TimePickerIncreaseMinuteIcon string? null Custom CSS classes/styles for the time-picker's increase minute icon of the BitDatePicker.
TimePickerDecreaseMinuteButton string? null Custom CSS classes/styles for the time-picker's decrease minute button of the BitDatePicker.
TimePickerDecreaseMinuteIcon string? null Custom CSS classes/styles for the time-picker's decrease minute icon of the BitDatePicker.
TimePickerAmPmContainer string? null Custom CSS classes/styles for the time-picker's Am Pm container of the BitDatePicker.
TimePickerAmButton string? null Custom CSS classes/styles for the time-picker's Am button of the BitDatePicker.
TimePickerPmButton string? null Custom CSS classes/styles for the time-picker's Pm button of the BitDatePicker.
Divider string? null Custom CSS classes/styles for the main divider of the BitDatePicker.
YearMonthPickerWrapper string? null Custom CSS classes/styles for the year-month-picker's wrapper of the BitDatePicker.
MonthPickerHeader string? null Custom CSS classes/styles for the month-picker's header of the BitDatePicker.
TimePickerHeader string? null Custom CSS classes/styles for the time-picker's header of the BitDatePicker.
YearPickerToggleButton string? null Custom CSS classes/styles for the year-picker's toggle button of the BitDatePicker.
ShowTimePickerButton string? null Custom CSS classes/styles for the show time-picker button of the BitDatePicker.
ShowTimePickerIcon string? null Custom CSS classes/styles for the show time-picker icon of the BitDatePicker.
MonthPickerNavWrapper string? null Custom CSS classes/styles for the wrapper of the month-picker's nav buttons of the BitDatePicker.
TimePickerNavWrapper string? null Custom CSS classes/styles for the wrapper of the time-picker's nav buttons of the BitDatePicker.
PrevYearNavButton string? null Custom CSS classes/styles for the Go to previous year button of the BitDatePicker.
PrevYearNavIcon string? null Custom CSS classes/styles for the Go to previous year icon of the BitDatePicker.
NextYearNavButton string? null Custom CSS classes/styles for the Go to next year button of the BitDatePicker.
NextYearNavIcon string? null Custom CSS classes/styles for the Go to next year icon of the BitDatePicker.
MonthsContainer string? null Custom CSS classes/styles for the months container of the BitDatePicker.
MonthsRow string? null Custom CSS classes/styles for each row of the months of the BitDatePicker.
MonthButton string? null Custom CSS classes/styles for each month button of the BitDatePicker.
YearPickerHeader string? null Custom CSS classes/styles for the year-picker's header of the BitDatePicker.
MonthPickerToggleButton string? null Custom CSS classes/styles for the month-picker's toggle button of the BitDatePicker.
YearPickerNavWrapper string? null Custom CSS classes/styles for the wrapper of the year-picker nav buttons of the BitDatePicker.
PrevYearRangeNavButton string? null Custom CSS classes/styles for the Go to previous year-range button of the BitDatePicker.
PrevYearRangeNavIcon string? null Custom CSS classes/styles for the Go to previous year-range icon of the BitDatePicker.
NextYearRangeNavButton string? null Custom CSS classes/styles for the Go to next year-range button of the BitDatePicker.
NextYearRangeNavIcon string? null Custom CSS classes/styles for the Go to next year-range icon of the BitDatePicker.
YearsContainer string? null Custom CSS classes/styles of the years container of the BitDatePicker.
YearsRow string? null Custom CSS classes/styles for each row of the years of the BitDatePicker.
YearButton string? null Custom CSS classes/styles for each year button of the BitDatePicker.
ClearButton string? null Custom CSS classes/styles for the BitDatePicker's clear button.
ClearButtonIcon string? null Custom CSS classes/styles for the BitDatePicker's clear button icon.

BitIconInfo properties

Name Type Default value Description
Name string? null Gets or sets the name of the icon.
BaseClass string? null Gets or sets the base CSS class for the icon. For built-in Fluent UI icons, this defaults to "bit-icon". For external icon libraries like FontAwesome, you might set this to "fa" or leave empty.
Prefix string? null Gets or sets the CSS class prefix used before the icon name. For built-in Fluent UI icons, this defaults to "bit-icon--". For external icon libraries, you might set this to "fa-" or leave empty.

BitColor enum

Name Value Description
Primary 0 Primary general color.
Secondary 1 Secondary general color.
Tertiary 2 Tertiary general color.
Info 3 Info general color.
Success 4 Success general color.
Warning 5 Warning general color.
SevereWarning 6 SevereWarning general color.
Error 7 Error general color.
PrimaryBackground 8 Primary background color.
SecondaryBackground 9 Secondary background color.
TertiaryBackground 10 Tertiary background color.
PrimaryForeground 11 Primary foreground color.
SecondaryForeground 12 Secondary foreground color.
TertiaryForeground 13 Tertiary foreground color.
PrimaryBorder 14 Primary border color.
SecondaryBorder 15 Secondary border color.
TertiaryBorder 16 Tertiary border color.

BitSize enum

Name Value Description
Small 0 The small size DatePicker.
Medium 1 The medium size DatePicker.
Large 2 The large size DatePicker.

BitVisibility enum

Name Value Description
Visible 0 Show content of the component.
Hidden 1 Hide content of the component,though the space it takes on the page remains.
Collapsed 2 Hide content of the component,though the space it takes on the page gone.

BitIconLocation enum

Name Value Description
Left 0 Show the icon at the left side.
Right 1 Show the icon at the right side.

BitTimeFormat enum

Name Value Description
TwentyFourHours 0 Show time pickers in 24 hours format.
TwelveHours 1 Show time pickers in 12 hours format.

BitDropDirection enum

Name Value Description
All 0 The direction determined automatically based on the available spaces in all directions.
TopAndBottom 1 Show the callout at the top or bottom side.

BitDatePickerMode enum

Name Value Description
DatePicker 0 Standard date picker mode allowing selection of a specific day.
MonthPicker 1 Month picker mode allowing selection of only month and year. The day is automatically set to the 1st of the selected month.

BitVisibility enum

Name Value Description
Visible 0 The content of the component is visible.
Hidden 1 The content of the component is hidden, but the space it takes on the page remains (visibility:hidden).
Collapsed 2 The component is hidden (display:none).

BitDir enum

Name Value Description
Ltr 0 Ltr (left to right) is to be used for languages that are written from the left to the right (like English).
Rtl 1 Rtl (right to left) is to be used for languages that are written from the right to the left (like Arabic).
Auto 2 Auto lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then applies that directionality to the whole element.

Feedback

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