Skip to content

Pickers

DateRangePicker

Bit.BlazorUI

A BitDateRangePicker offers a drop-down control that’s optimized for picking two dates from a calendar view where contextual information like the day of the week or fullness of the calendar is important. The first click sets the start of the range, the second one closes it, and the days in between are highlighted while the pointer moves. Up to three months can be shown side by side and the most common ranges offered as one-click presets. The calendar can be constrained (MinDate, MaxDate, MinRange, MaxRange, disabled days), extended with a start/end time picker, rendered inline, navigated entirely from the keyboard and localized to any culture and time zone.

Usage

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

Basic

The DateRangePicker renders a read-only input that opens a calendar callout. Clicking a day starts the range, clicking a second day closes it, and clicking again starts a new range. Beyond the usual input states (Label, Placeholder, Required, IsEnabled) the calendar itself can show week numbers, highlight the current and selected month, and render a start/end time picker with ShowTimePicker. The input's look is adjustable too: IconName/IconLocation replace and reposition its icon, and Underlined and HasBorder switch between the bordered, underlined and borderless appearances. AutoClose closes the callout after the second pick and disabling it keeps the callout open, ShowClearButton adds a reset button (labelled through ClearButtonTitle) once a range is set, and StartingValue decides which month and which times the calendar opens on while no value is selected. Opening the callout moves the keyboard focus onto the day grid, unless the input is editable and the range may still be typed.




























StartingValue: December 2020
Start Time: 10:12
End Time: 16:59

Presets

Presets renders a list of shortcuts next to the calendar so the most common ranges are one click away. Each BitDateRangePickerPreset carries the text of its button and either a fixed Value or a ValueProvider function, which is re-evaluated on every click and therefore keeps relative ranges such as "Last 7 days" correct however long the page has been open. The applied preset stays highlighted until the range is changed by any other means, OnPresetSelect reports which one was clicked, and when AutoClose is on (and the picker is not Standalone), selecting one closes the callout just like picking the second date does. A preset can also be disabled, titled and styled individually. A preset whose range violates the calendar's restrictions (MinDate, MaxDate, MinRange, the disabled days or ExcludeDisabledDates) is rejected when clicked, since a shifted variant of the advertised range would not be the range its button promised.

Selected: - → -
Last selected preset: -


August 2026
S
M
T
W
T
F
S

Min & Max

MinDate and MaxDate bound the whole calendar: days, months and years outside them are disabled and the navigation buttons stop at the boundary. MaxRange and MinRange instead bound the length of the selection itself - once the start date is picked, every day that would produce a range longer than MaxRange or shorter than MinRange becomes unselectable. MaxRange also accounts for the hours and minutes of a range, so the time picker's spinners are disabled as soon as they would exceed it. DisablePast and DisableFuture bound the calendar by today exactly as a MinDate or a MaxDate of today would, without having to keep one up to date; where both apply, the narrower of the two 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)


DisablePast:


DisableFuture:


MaxRange: 2 days, 4 hours and 30 minutes


MinRange: 3 days (a stay of at least 3 nights)


MinRange: 2 days & MaxRange: 7 days

Disabled dates

Beyond the min/max bounds, individual days can be blocked out. DisabledDaysOfWeek takes the recurring days to disable (weekends, for example), DisabledDates takes an explicit list of dates (holidays, blackout days) and IsDateDisabled takes a predicate for anything rule-based. Disabled days cannot be clicked and are skipped by the keyboard navigation, but by default the range simply spans over them, so use them for days that must not be a start or an end of the selection. When the range must not cover them at all, ExcludeDisabledDates also disables every day whose range, measured from the already picked start date, would contain one.

DisabledDaysOfWeek: weekends


DisabledDates: an explicit list of blackout days


IsDateDisabled: every day before today


ExcludeDisabledDates: the range cannot reach past a blackout day

Highlighted dates

HighlightedDates marks days that deserve attention without making them unselectable, and GetDayClass attaches an arbitrary CSS class to any day cell, which makes it possible to color-code a calendar (busy days, promotions, deadlines) from the application's own data.
HighlightedDates: the next three days


GetDayClass: paints every Friday

Calendar layout

The shape of the day grid is configurable: FirstDayOfWeek overrides the first column of the week coming from the culture, ShowOutsideDays hides the leading and trailing days of the adjacent months, FixedWeeks always renders six week rows so the calendar keeps a constant height while navigating, WeekNumberRule chooses how week numbers are computed, and Today overrides the date the calendar considers as today, which is useful for tests and for server-driven "current date" scenarios.








Multiple months

MonthCount renders up to three consecutive months side by side, which is how a range spanning a month boundary is picked without navigating in between: the hover preview, the selection and the keyboard navigation all flow across the grids. Only the first month carries the "previous month" button and only the last one the "next month" button, so navigating moves the whole strip. The days of the adjacent months are dropped from the grids, since they would otherwise show up twice, and the calendar quietly falls back to a single month whenever the viewport is too narrow to fit them all. By default each navigation click moves the strip by a single month; PagedNavigation makes it move by all of the rendered months at once, so consecutive pages never overlap.







Selected: - → -


August 2026
S
M
T
W
T
F
S
September 2026
S
M
T
W
T
F
S

Hour/Minute step

HourStep and MinuteStep set how much each press of the time picker's up/down buttons changes the start and end times. They apply to both the start and the end time inputs and are handy for quarter-hour bookings or shift-based scheduling.

Formatting

DateFormat controls how each of the two dates is rendered (and parsed back, when text input is allowed), while ValueFormat is the template that composes them into the single string shown in the input; {0} is the start date and {1} is the end date. When no DateFormat is provided the culture's short date pattern is used, extended with the time pattern whenever ShowTimePicker is enabled. An end date that has not been picked yet is rendered as ---, which NoDateText replaces with any wording of its own, both when the value is written out and when it is typed back in.






Text input

With AllowTextInput the input becomes editable and the typed text is parsed back into a range. The text must follow the ValueFormat template with both dates written in the DateFormat pattern; an unparsable value raises the validation error of InvalidErrorMessage. Leaving the end date as --- (or empty) keeps the range open-ended, and a reversed pair is swapped automatically. A typed range is also validated against every restriction the calendar enforces (MinDate, MaxDate, MinRange, MaxRange, the disabled days and ExcludeDisabledDates), so no range that could not be picked from the day grid can slip in through the text input.




A typed range longer than the 7-day MaxRange is rejected as invalid:

Binding

The value of the component is a BitDateRangePickerValue holding a nullable StartDate and EndDate, so a half-picked range is representable. Use @bind-Value for two-way binding, or DefaultValue together with the OnChange callback for the uncontrolled mode.

From: 1/17/2020 12:00:00 AM +02:00
To: 1/25/2020 12:00:00 AM +02:00

Culture

By default, BitDateRangePicker picks the current culture. But you can provide your own instance of CultureInfo for any custom culture. The whole calendar follows it: the calendar system (Gregorian, Persian, Hijri…), the month and day names, the first day of the week, the AM/PM designators and the text direction.
You also can use our CultureInfoHelper class or check its code to see how to create a custom culture.



TimeZone

TimeZone specifies the time zone used to interpret and display the selected dates and times, so the offsets of the produced DateTimeOffset values belong to that zone instead of the local one.
Remember using this feature in different runtimes needs more investigations, for example, there are different data 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 range: from - to -




"Dateline Standard Time" TimeZone:


Selected date range: from - to -

Standalone

Standalone renders the calendar inline instead of inside a callout, dropping the input and the overlay. It suits filter panels, dashboards and any layout where the calendar should always be visible; the value binding, the constraints and the time picker all behave exactly as they do in the drop-down mode.
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
:
:

ReadOnly

ReadOnly keeps the component fully rendered and navigable - the callout still opens and the months can still be browsed - but blocks every change: days cannot be selected, the time spinners are inert, the typed text is ignored and the clear button is not rendered. Unlike IsEnabled="false", the value is still submitted with the form.




Selected date range Start: 12/8/2024 - End: 12/12/2024
December 2024
S
M
T
W
T
F
S


Selected date range Start: 12/8/2024 12:15 - End: 12/12/2024 16:45
S
M
T
W
T
F
S
:
:

Templates

Every cell of the calendar can be rendered by the application. LabelTemplate and IconTemplate replace the label and the input's icon, while DayCellTemplate and MonthCellTemplate receive the date of the cell being rendered and YearCellTemplate receives its year number, so each can decorate the cell with badges, colors or any other markup.












Responsive

Responsive turns the callout into a full-width panel that slides down from the top of the screen on small viewports, enlarging the day cells and the time inputs for touch, and letting the panel be dismissed with a swipe. On wider screens the component keeps its regular drop-down layout.

Validation

Inside an EditForm the DateRangePicker participates in the data annotations validation like any other input: the field is marked invalid until the bound BitDateRangePickerValue satisfies the model's rules, and the messages are reported through ValidationMessage. A custom validation attribute is the natural place for range rules that the calendar itself cannot express.


Color

The Color parameter applies one of the theme colors to the accented parts of the calendar: the today cell, the two ends of the selected range, the highlighted current month and the active AM/PM button.














External Icons

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


FontAwesome:






Bootstrap:






Navigation & ClearButton Icons (FontAwesome):





Navigation Icons (Bootstrap):

Style & Class

Style and Class reach the root element only, while Styles and Classes address every part of the component individually - the input and its container, the callout, the day/month/year grids and each of the time picker's buttons - so a fully custom look can be built without overriding the library's CSS.


Component's Style & Class:





Styles & Classes:


RTL

Set Dir to BitDir.Rtl to render the DateRangePicker in a right-to-left layout. The calendar, the navigation buttons and the arrow-key navigation all mirror accordingly. A right-to-left Culture switches the direction on its own, so Dir is only needed to override it.

API

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

BitDateRangePicker parameters

Name Type Default value Description
AllowTextInput bool false Whether or not the DateRangePicker allows string date inputs. A typed range is validated against every restriction the calendar enforces (MinDate, MaxDate, MinRange, MaxRange, the disabled days and ExcludeDisabledDates), so an out-of-bounds range is rejected as an invalid value.
AutoClose bool true Whether the DateRangePicker closes automatically after selecting the second value.
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 DateRangePicker's callout for screen readers.
CalloutFooterTemplate RenderFragment? null Custom template to render at the bottom of the callout, below everything it holds.
CalloutHeaderTemplate RenderFragment? null Custom template to render at the top of the callout, above everything it holds.
CalloutHtmlAttributes Dictionary<string, object> new Dictionary<string, object>() Capture and render additional html attributes for the DateRangePicker's callout.
Classes BitDateRangePickerClassStyles? null Custom CSS classes for different parts of the BitDateRangePicker.
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 the selected date range The title and the aria-label 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 range picker The title of the close button (tooltip).
Color BitColor? null The general color of the DateRangePicker that applies to the today day button, the selected range, the highlighted current month and the selected AM/PM buttons.
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? null CultureInfo for the DateRangePicker. If not set, CultureInfo.CurrentUICulture is used.
DateFormat string? null The format of each of the two dates in the DateRangePicker. Defaults to the short date pattern of the Culture, extended with the time pattern when ShowTimePicker is enabled.
DayCellTemplate RenderFragment<DateTimeOffset>? null Custom template to render the day cells of the DateRangePicker.
DisableFuture bool false Disables every day after today, exactly as a MaxDate of today would. When both are set, the earlier of the two bounds wins.
DisablePast bool false Disables every day before today, exactly as a MinDate of today would. When both are set, the later of the two bounds wins.
DisabledDates IEnumerable<DateTimeOffset>? null The list of dates that are disabled (not selectable) in the DateRangePicker, in addition to MinDate and MaxDate.
DisabledDaysOfWeek IEnumerable<DayOfWeek>? null The days of the week that are disabled (not selectable) in the DateRangePicker (e.g. weekends).
EndTimeDecreaseHourIcon BitIconInfo? null The icon to display inside the end time-picker's decrease-hour button. Takes precedence over EndTimeDecreaseHourIconName when both are set.
EndTimeDecreaseHourIconName string? null The name of the end time-picker's decrease-hour button icon from the built-in Fluent UI icon set.
EndTimeDecreaseHourTitle string Decrease end hour The title and the aria-label of the end time-picker's decrease-hour button.
EndTimeDecreaseMinuteIcon BitIconInfo? null The icon to display inside the end time-picker's decrease-minute button. Takes precedence over EndTimeDecreaseMinuteIconName when both are set.
EndTimeDecreaseMinuteIconName string? null The name of the end time-picker's decrease-minute button icon from the built-in Fluent UI icon set.
EndTimeDecreaseMinuteTitle string Decrease end minute The title and the aria-label of the end time-picker's decrease-minute button.
EndTimeHourInputAriaLabel string End hour The aria-label of the end time-picker's hour input.
EndTimeIncreaseHourIcon BitIconInfo? null The icon to display inside the end time-picker's increase-hour button. Takes precedence over EndTimeIncreaseHourIconName when both are set.
EndTimeIncreaseHourIconName string? null The name of the end time-picker's increase-hour button icon from the built-in Fluent UI icon set.
EndTimeIncreaseHourTitle string Increase end hour The title and the aria-label of the end time-picker's increase-hour button.
EndTimeIncreaseMinuteIcon BitIconInfo? null The icon to display inside the end time-picker's increase-minute button. Takes precedence over EndTimeIncreaseMinuteIconName when both are set.
EndTimeIncreaseMinuteIconName string? null The name of the end time-picker's increase-minute button icon from the built-in Fluent UI icon set.
EndTimeIncreaseMinuteTitle string Increase end minute The title and the aria-label of the end time-picker's increase-minute button.
EndTimeMinuteInputAriaLabel string End minute The aria-label of the end time-picker's minute input.
ExcludeDisabledDates bool false Whether the disabled days are excluded from the selected range. By default a range simply spans over the disabled days between its two ends. When enabled, once the start date is picked every day whose range would contain a disabled day becomes unselectable.
FirstDayOfWeek DayOfWeek? null Overrides the first day of the week in 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 calendar height fixed while navigating between months.
GetDayClass Func<DateTimeOffset, string?>? null Custom function to provide additional CSS classes for each day button of the DateRangePicker.
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 DateRangePicker has a border.
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 of the DateRangePicker.
HighlightSelectedMonth bool false Whether the month picker should highlight the selected month.
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).
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. Takes precedence over IconName when both are set. Use for external libraries (e.g. BitIconInfo.Fa("solid calendar"), BitIconInfo.Bi("calendar3"), BitIconInfo.Css("my-class")).
IconLocation BitIconLocation BitIconLocation.Right Determines the location of the DateRangePicker's icon.
IconName string? CalendarMirrored The name of the icon from the built-in Fluent UI icon set. For external icon libraries, use Icon instead.
IconTemplate RenderFragment? null Custom template for the DateRangePicker'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 DateRangePicker.
IsMonthPickerVisible bool true Whether the month picker is shown or hidden.
IsOpen bool false Whether or not the DateRangePicker's callout is open.
Label string? null The text of the DateRangePicker's label.
LabelTemplate RenderFragment? null Custom template for the DateRangePicker's label.
MaxDate DateTimeOffset? null The maximum date allowed for the DateRangePicker.
MaxRange TimeSpan? null The maximum range of day and times allowed for selection in DateRangePicker.
MinDate DateTimeOffset? null The minimum date allowed for the DateRangePicker.
MinRange TimeSpan? null The minimum number of days that the selected range must span in the DateRangePicker. Only the days part of the provided TimeSpan is considered.
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.
MonthCellTemplate RenderFragment<DateTimeOffset>? null Custom template to render the month cells of the DateRangePicker.
MonthCount int 1 The number of consecutive months rendered side by side in the day picker (1 to 3), which makes picking a range that spans two months a single move. It falls back to a single month whenever the viewport is not wide enough to fit them all.
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.
NoDateText string --- The text rendered in place of a date that has not been picked yet, which is also the token accepted back for an open-ended range when AllowTextInput is enabled.
OnClear EventCallback Callback for when the value is cleared using the clear button.
OnClick EventCallback The callback for clicking on the DateRangePicker's input.
OnClose EventCallback Callback for when the callout is closed.
OnFocus EventCallback The callback for focusing the DateRangePicker's input.
OnFocusIn EventCallback The callback for when the focus moves into the DateRangePicker's input.
OnFocusOut EventCallback The callback for when the focus moves out of the DateRangePicker's input.
OnMonthChange EventCallback<DateTimeOffset> 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.
OnPresetSelect EventCallback<BitDateRangePickerPreset> The callback for when a preset is selected. The argument is the selected preset.
PagedNavigation bool false Whether the previous and next navigation buttons move the calendar by all of its rendered months instead of one, so consecutive pages of a multi-month calendar never overlap. It has no effect when MonthCount renders a single month.
OutOfRangeErrorMessage string? null The custom validation error message for a range entered as text that breaks the bounds, the disabled days, or MinRange and MaxRange. Text that does not read as a range at all reports InvalidErrorMessage instead.
Placeholder string string.Empty The placeholder text of the DateRangePicker's input.
Presets IEnumerable<BitDateRangePickerPreset>? null The list of shortcuts, rendered next to the calendar, that fill the DateRangePicker with a predefined range (e.g. "Last 7 days").
PresetsAriaLabel string Predefined date ranges The aria label of the presets' container for screen readers.
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 range {0} The aria-atomic live text announcing the currently selected date range, formatted with the value of the input.
ShowClearButton bool false Whether the clear button should be shown or not when the DateRangePicker has a value.
ShowCloseButton bool false Whether the DateRangePicker'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 range picker when visible.
ShowOutsideDays bool true Whether the days of the previous and next months, filling the first and last week rows, should be rendered.
ShowTimePicker bool false Whether or not render the time-picker.
ShowTimePickerAsOverlay bool false Show the time picker on top of the date range 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.
Standalone bool false Whether the DateRangePicker is rendered standalone or with the input component and callout.
StartingValue BitDateRangePickerValue? null Specifies the date and time of the date and time picker when it is opened without any selected value.
StartTimeDecreaseHourIcon BitIconInfo? null The icon to display inside the start time-picker's decrease-hour button. Takes precedence over StartTimeDecreaseHourIconName when both are set.
StartTimeDecreaseHourIconName string? null The name of the start time-picker's decrease-hour button icon from the built-in Fluent UI icon set.
StartTimeDecreaseHourTitle string Decrease start hour The title and the aria-label of the start time-picker's decrease-hour button.
StartTimeDecreaseMinuteIcon BitIconInfo? null The icon to display inside the start time-picker's decrease-minute button. Takes precedence over StartTimeDecreaseMinuteIconName when both are set.
StartTimeDecreaseMinuteIconName string? null The name of the start time-picker's decrease-minute button icon from the built-in Fluent UI icon set.
StartTimeDecreaseMinuteTitle string Decrease start minute The title and the aria-label of the start time-picker's decrease-minute button.
StartTimeHourInputAriaLabel string Start hour The aria-label of the start time-picker's hour input.
StartTimeIncreaseHourIcon BitIconInfo? null The icon to display inside the start time-picker's increase-hour button. Takes precedence over StartTimeIncreaseHourIconName when both are set.
StartTimeIncreaseHourIconName string? null The name of the start time-picker's increase-hour button icon from the built-in Fluent UI icon set.
StartTimeIncreaseHourTitle string Increase start hour The title and the aria-label of the start time-picker's increase-hour button.
StartTimeIncreaseMinuteIcon BitIconInfo? null The icon to display inside the start time-picker's increase-minute button. Takes precedence over StartTimeIncreaseMinuteIconName when both are set.
StartTimeIncreaseMinuteIconName string? null The name of the start time-picker's increase-minute button icon from the built-in Fluent UI icon set.
StartTimeIncreaseMinuteTitle string Increase start minute The title and the aria-label of the start time-picker's increase-minute button.
StartTimeMinuteInputAriaLabel string Start minute The aria-label of the start time-picker's minute input.
Styles BitDateRangePickerClassStyles? null Custom CSS styles for different parts of the BitDateRangePicker.
TimeFormat BitTimeFormat BitTimeFormat.TwentyFourHours Time format of the time-pickers, 24H or 12H.
TimeZone TimeZoneInfo? null TimeZone for the DateRangePicker.
Today DateTimeOffset? null Overrides the date considered as today by the DateRangePicker, which is DateTimeOffset.Now by default.
Underlined bool false Whether or not the Text field of the DateRangePicker is underlined.
ValueFormat string Start: {0} - End: {1} The string format used to show the DateRangePicker's value in its input, where {0} is the start date and {1} is the end date. It is also the template used to parse the typed text back when AllowTextInput is enabled.
WeekNumberRule CalendarWeekRule? null The rule used to calculate the week numbers. If not set, CalendarWeekRule.FirstFullWeek is used.
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 DateRangePicker.
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).

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.

BitDateRangePickerValue properties

Name Type Default value Description
StartDate DateTimeOffset? null Indicates the beginning of the date range.
EndDate DateTimeOffset? null Indicates the end of the date range.

BitDateRangePickerPreset properties

Name Type Default value Description
Text string The text of the preset's button.
Value BitDateRangePickerValue? null The range applied when the preset is selected. ValueProvider takes precedence over this when both are set.
ValueProvider Func<BitDateRangePickerValue?>? null Custom function providing the range applied when the preset is selected. Unlike Value it is evaluated on each selection, which keeps relative ranges (e.g. "Last 7 days") correct no matter how long the page has been open.
IsEnabled bool true Whether the preset's button is enabled.
Title string? null The title of the preset's button (tooltip).
Class string? null Custom CSS class for the preset's button.
Style string? null Custom CSS style for the preset's button.

BitDateRangePickerClassStyles properties

Name Type Default value Description
Root string? null Custom CSS classes/styles for the root element of the BitDateRangePicker.
Focused string? null Custom CSS classes/styles for the focused state of the BitDateRangePicker.
Label string? null Custom CSS classes/styles for the Label of the BitDateRangePicker.
InputWrapper string? null Custom CSS classes/styles for the input wrapper of the BitDateRangePicker.
InputContainer string? null Custom CSS classes/styles for the input container of the BitDateRangePicker.
Input string? null Custom CSS classes/styles for the input of the BitDateRangePicker.
ClearButton string? null Custom CSS classes/styles for the clear button of the BitDateRangePicker.
ClearButtonIcon string? null Custom CSS classes/styles for the clear button icon of the BitDateRangePicker.
Icon string? null Custom CSS classes/styles for the icon of the BitDateRangePicker.
Overlay string? null Custom CSS classes/styles for the overlay of the BitDateRangePicker.
Callout string? null Custom CSS classes/styles for the callout of the BitDateRangePicker.
CalloutContainer string? null Custom CSS classes/styles for the callout container of the BitDateRangePicker.
CalloutHeader string? null Custom CSS classes/styles for the callout header, the container of the CalloutHeaderTemplate.
CalloutFooter string? null Custom CSS classes/styles for the callout footer, the container of the CalloutFooterTemplate.
Group string? null Custom CSS classes/styles for the group of the BitDateRangePicker.
PresetsContainer string? null Custom CSS classes/styles for the presets' container of the BitDateRangePicker.
PresetButton string? null Custom CSS classes/styles for each preset button of the BitDateRangePicker.
SelectedPresetButton string? null Custom CSS classes/styles for the currently selected preset button of the BitDateRangePicker.
DayPickerWrapper string? null Custom CSS classes/styles for the day-picker's wrapper of the BitDateRangePicker.
DayPickerHeader string? null Custom CSS classes/styles for the day-picker's header of the BitDateRangePicker.
DayPickerMonth string? null Custom CSS classes/styles for the day-picker's month of the BitDateRangePicker.
DayPickerNavWrapper string? null Custom CSS classes/styles for the wrapper of the day-picker's nav buttons of the BitDateRangePicker.
PrevMonthNavButton string? null Custom CSS classes/styles for the Go to previous month button of the BitDateRangePicker.
PrevMonthNavIcon string? null Custom CSS classes/styles for the Go to previous month icon of the BitDateRangePicker.
GoToTodayButton string? null Custom CSS classes/styles for the Go to today button of the BitDateRangePicker.
GoToTodayIcon string? null Custom CSS classes/styles for the Go to today icon of the BitDateRangePicker.
CloseButton string? null Custom CSS classes/styles for the close button of the BitDateRangePicker.
CloseButtonIcon string? null Custom CSS classes/styles for the close button icon of the BitDateRangePicker.
NextMonthNavButton string? null Custom CSS classes/styles for the Go to next month button of the BitDateRangePicker.
NextMonthNavIcon string? null Custom CSS classes/styles for the Go to next month icon of the BitDateRangePicker.
DaysGrid string? null Custom CSS classes/styles for the days grid of the BitDateRangePicker.
DaysHeaderRow string? null Custom CSS classes/styles for the header row of the days of the BitDateRangePicker.
WeekNumbersHeader string? null Custom CSS classes/styles for the header cell of the week numbers column of the BitDateRangePicker.
WeekDayHeader string? null Custom CSS classes/styles for each day of the week header cell of the BitDateRangePicker.
DaysRow string? null Custom CSS classes/styles for each row of the days of the BitDateRangePicker.
WeekNumber string? null Custom CSS classes/styles for the week number of the BitDateRangePicker.
DayButton string? null Custom CSS classes/styles for each day button of the BitDateRangePicker.
HighlightedDayButton string? null Custom CSS classes/styles for the highlighted day buttons of the BitDateRangePicker.
HoveredDayButtons string? null Custom CSS classes/styles for the day buttons inside the prospective range being hovered in the BitDateRangePicker.
TodayDayButton string? null Custom CSS classes/styles for today day button of the BitDateRangePicker.
StartDayButton string? null Custom CSS classes/styles for selected start day button of the BitDateRangePicker.
SelectedDayButtons string? null Custom CSS classes/styles for selected day buttons of the BitDateRangePicker.
EndDayButton string? null Custom CSS classes/styles for selected end day button of the BitDateRangePicker.
StartAndEndSelectionDays string? null Custom CSS classes/styles for selected start and end day buttons of the BitDateRangePicker.
TimePickerWrapper string? null Custom CSS classes/styles for the time-picker's wrapper of the BitDateRangePicker.
TimePickerHeader string? null Custom CSS classes/styles for the time-picker's header of the BitDateRangePicker.
TimePickerNavWrapper string? null Custom CSS classes/styles for the wrapper of the time-picker's nav buttons of the BitDateRangePicker.
ShowTimePickerButton string? null Custom CSS classes/styles for the show time-picker button of the BitDateRangePicker.
ShowTimePickerIcon string? null Custom CSS classes/styles for the show time-picker icon of the BitDateRangePicker.
HideTimePickerButton string? null Custom CSS classes/styles for the hide time-picker button of the BitDateRangePicker.
HideTimePickerIcon string? null Custom CSS classes/styles for the hide time-picker icon of the BitDateRangePicker.
TimeInputContainer string? null Custom CSS classes/styles for the time's input container of the BitDateRangePicker.
StartTimeInputContainer string? null Custom CSS classes/styles for the start time's input container of the BitDateRangePicker.
EndTimeInputContainer string? null Custom CSS classes/styles for the end time's input container of the BitDateRangePicker.
StartTimeHourInputContainer string? null Custom CSS classes/styles for the start time's hour input container of the BitDateRangePicker.
EndTimeHourInputContainer string? null Custom CSS classes/styles for the end time's hour input container of the BitDateRangePicker.
StartTimeMinuteInputContainer string? null Custom CSS classes/styles for the start time's minute input container of the BitDateRangePicker.
EndTimeMinuteInputContainer string? null Custom CSS classes/styles for the end time's minute input container of the BitDateRangePicker.
StartTimeHourInput string? null Custom CSS classes/styles for the start time's hour input of the BitDateRangePicker.
EndTimeHourInput string? null Custom CSS classes/styles for the end time's hour input of the BitDateRangePicker.
StartTimeMinuteInput string? null Custom CSS classes/styles for the start time's minute input of the BitDateRangePicker.
EndTimeMinuteInput string? null Custom CSS classes/styles for the end time's minute input of the BitDateRangePicker.
StartTimeHourMinuteSeparator string? null Custom CSS classes/styles for the start time's hour/minute separator of the BitDateRangePicker.
EndTimeHourMinuteSeparator string? null Custom CSS classes/styles for the end time's hour/minute separator of the BitDateRangePicker.
StartTimeIncreaseHourButton string? null Custom CSS classes/styles for the start time's increase hour button of the BitDateRangePicker.
StartTimeIncreaseHourIcon string? null Custom CSS classes/styles for the start time's increase hour icon of the BitDateRangePicker.
StartTimeDecreaseHourButton string? null Custom CSS classes/styles for the start time's decrease hour button of the BitDateRangePicker.
StartTimeDecreaseHourIcon string? null Custom CSS classes/styles for the start time's decrease hour icon of the BitDateRangePicker.
StartTimeIncreaseMinuteButton string? null Custom CSS classes/styles for the start time's increase minute button of the BitDateRangePicker.
StartTimeIncreaseMinuteIcon string? null Custom CSS classes/styles for the start time's increase minute icon of the BitDateRangePicker.
StartTimeDecreaseMinuteButton string? null Custom CSS classes/styles for the start time's decrease minute button of the BitDateRangePicker.
StartTimeDecreaseMinuteIcon string? null Custom CSS classes/styles for the start time's decrease minute icon of the BitDateRangePicker.
EndTimeIncreaseHourButton string? null Custom CSS classes/styles for the end time's increase hour button of the BitDateRangePicker.
EndTimeIncreaseHourIcon string? null Custom CSS classes/styles for the end time's increase hour icon of the BitDateRangePicker.
EndTimeDecreaseHourButton string? null Custom CSS classes/styles for the end time's decrease hour button of the BitDateRangePicker.
EndTimeDecreaseHourIcon string? null Custom CSS classes/styles for the end time's decrease hour icon of the BitDateRangePicker.
EndTimeIncreaseMinuteButton string? null Custom CSS classes/styles for the end time's increase minute button of the BitDateRangePicker.
EndTimeIncreaseMinuteIcon string? null Custom CSS classes/styles for the end time's increase minute icon of the BitDateRangePicker.
EndTimeDecreaseMinuteButton string? null Custom CSS classes/styles for the end time's decrease minute button of the BitDateRangePicker.
EndTimeDecreaseMinuteIcon string? null Custom CSS classes/styles for the end time's decrease minute icon of the BitDateRangePicker.
StartTimeAmPmContainer string? null Custom CSS classes/styles for the start time's Am Pm container of the BitDateRangePicker.
EndTimeAmPmContainer string? null Custom CSS classes/styles for the end time's Am Pm container of the BitDateRangePicker.
StartTimeAmButton string? null Custom CSS classes/styles for the start time's Am button of the BitDateRangePicker.
StartTimePmButton string? null Custom CSS classes/styles for the start time's Pm button of the BitDateRangePicker.
EndTimeAmButton string? null Custom CSS classes/styles for the end time's Am button of the BitDateRangePicker.
EndTimePmButton string? null Custom CSS classes/styles for the end time's Pm button of the BitDateRangePicker.
Divider string? null Custom CSS classes/styles for the main divider of the BitDateRangePicker.
YearMonthPickerWrapper string? null Custom CSS classes/styles for the year-month-picker's wrapper of the BitDateRangePicker.
MonthPickerHeader string? null Custom CSS classes/styles for the month-picker's header of the BitDateRangePicker.
YearPickerToggleButton string? null Custom CSS classes/styles for the year-picker's toggle button of the BitDateRangePicker.
MonthPickerNavWrapper string? null Custom CSS classes/styles for the wrapper of the month-picker's nav buttons of the BitDateRangePicker.
PrevYearNavButton string? null Custom CSS classes/styles for the Go to previous year button of the BitDateRangePicker.
PrevYearNavIcon string? null Custom CSS classes/styles for the Go to previous year icon of the BitDateRangePicker.
NextYearNavButton string? null Custom CSS classes/styles for the Go to next year button of the BitDateRangePicker.
NextYearNavIcon string? null Custom CSS classes/styles for the Go to next year icon of the BitDateRangePicker.
MonthsContainer string? null Custom CSS classes/styles for the months container of the BitDateRangePicker.
MonthsRow string? null Custom CSS classes/styles for each row of the months of the BitDateRangePicker.
MonthButton string? null Custom CSS classes/styles for each month button of the BitDateRangePicker.
YearPickerHeader string? null Custom CSS classes/styles for the year-picker's header of the BitDateRangePicker.
MonthPickerToggleButton string? null Custom CSS classes/styles for the month-picker's toggle button of the BitDateRangePicker.
YearPickerNavWrapper string? null Custom CSS classes/styles for the wrapper of the year-picker nav buttons of the BitDateRangePicker.
PrevYearRangeNavButton string? null Custom CSS classes/styles for the Go to previous year-range button of the BitDateRangePicker.
PrevYearRangeNavIcon string? null Custom CSS classes/styles for the Go to previous year-range icon of the BitDateRangePicker.
NextYearRangeNavButton string? null Custom CSS classes/styles for the Go to next year-range button of the BitDateRangePicker.
NextYearRangeNavIcon string? null Custom CSS classes/styles for the Go to next year-range icon of the BitDateRangePicker.
YearsContainer string? null Custom CSS classes/styles for the years container of the BitDateRangePicker.
YearsRow string? null Custom CSS classes/styles for each row of the years of the BitDateRangePicker.
YearButton string? null Custom CSS classes/styles for each year button of the BitDateRangePicker.

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.

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.

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.