Accent color
# DateRangePicker
## Description
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. You can modify the calendar to provide additional context or to limit available dates.
## Parameters
| Name | Type | Default Value | Description |
| :--- | :--- | :------------ | :---------- |
| AllowTextInput | `bool` | false | Whether or not the DateRangePicker allows string date inputs. |
| AutoClose | `bool` | true | Whether the DateRangePicker closes automatically after selecting the second value. |
| CalloutAriaLabel | `string` | Calendar | Aria label of the DateRangePicker's callout for screen readers. |
| 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. |
| 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). |
| Culture | `CultureInfo` | CultureInfo.CurrentUICulture | CultureInfo for the DateRangePicker. |
| DateFormat | `string?` | null | The format of the date in the DateRangePicker. |
| DayCellTemplate | `RenderFragment<DateTimeOffset>?` | null | Custom template to render the day cells of the DateRangePicker. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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 | Determines increment/decrement steps for DateRangePicker's hour. |
| 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. |
| 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. |
| MinuteStep | `int` | 1 | Determines increment/decrement steps for DateRangePicker's minute. |
| MonthCellTemplate | `RenderFragment<DateTimeOffset>?` | null | Custom template to render the month cells of the DateRangePicker. |
| 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. |
| OnClick | `EventCallback` | | The callback for clicking on the DateRangePicker's input. |
| 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. |
| Placeholder | `string` | string.Empty | The placeholder text of the DateRangePicker'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. |
| 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. |
| ShowTimePicker | `bool` | false | Whether or not render the time-picker. |
| ShowTimePickerAsOverlay | `bool` | false | Show month picker on top of 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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). |
| 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. |
| 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. |
## 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. |
| 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. |
## Enums
### 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. |
## Sub Classes
### 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. |
### 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. |
| 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. |
| 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. |
| Group | `string?` | null | Custom CSS classes/styles for the group 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. |
| 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 of the week numbers 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. |
| 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. |
| TimePickerContainer | `string?` | null | Custom CSS classes/styles for the time-picker's main container of the BitDateRangePicker. |
| StartTimePickerWrapper | `string?` | null | Custom CSS classes/styles for the start time-picker's wrapper of the BitDateRangePicker. |
| EndTimePickerWrapper | `string?` | null | Custom CSS classes/styles for the end time-picker's wrapper of the BitDateRangePicker. |
| TimePickerWrapper | `string?` | null | Custom CSS classes/styles for the time-picker's wrapper of the BitDateRangePicker. |
| TimePickerHourInput | `string?` | null | Custom CSS classes/styles for the time-picker's hour input of the BitDateRangePicker. |
| TimePickerDivider | `string?` | null | Custom CSS classes/styles for the time-picker's divider of the BitDateRangePicker. |
| StartTimePickerAmPmContainer | `string?` | null | Custom CSS classes/styles for the start time-picker's minute input of the BitDateRangePicker. |
| EndTimePickerAmPmContainer | `string?` | null | Custom CSS classes/styles for the end time-picker's Am Pm container of the BitDateRangePicker. |
| TimePickerAmPmContainer | `string?` | null | Custom CSS classes/styles for the time-picker's Am Pm container of the BitDateRangePicker. |
| TimePickerAmPmContainer | `string?` | null | Custom CSS classes/styles for the time-picker's Am Pm container of the BitDateRangePicker. |
| TimePickerAmButton | `string?` | null | Custom CSS classes/styles for the time-picker's Am button of the BitDateRangePicker. |
| TimePickerPmButton | `string?` | null | Custom CSS classes/styles for the time-picker'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. |
## Examples
\n**Basic**:
```razor
```
```csharp
private BitDateRangePickerValue? startingValue = new()
{
StartDate = new DateTimeOffset(2020, 12, 4, 10, 12, 0, DateTimeOffset.Now.Offset),
EndDate = new DateTimeOffset(2020, 12, 4, 16, 59, 0, DateTimeOffset.Now.Offset),
};
```
\n**Min & Max**:
```razor
```
\n**Hour/Minute step**:
```razor
```
\n**Formatting**:
```razor
```
\n**Binding**:
```razor
```
\n**TimeZone**:
```razor
```
\n**ReadOnly**:
```razor
```
```csharp
private BitDateRangePickerValue? readOnlyDateRange = new()
{
StartDate = new DateTimeOffset(2024, 12, 8, 12, 15, 0, DateTimeOffset.Now.Offset),
EndDate = new DateTimeOffset(2024, 12, 12, 16, 45, 0, DateTimeOffset.Now.Offset),
};
```
\n**Templates**:
```razor
Custom label
@context.Day
@if (context.Day % 5 is 0)
{
}
@context
AC
```
```csharp
private CultureInfo culture = CultureInfo.CurrentUICulture;
```
\n**Responsive**:
```razor
```
\n**External Icons**:
```razor
```
\n**Style & Class**:
```razor
```
```csharp
private BitDateRangePickerValue? classesValue;
```
\n**RTL**:
```razor
```
From: @selectedDateRange?.StartDate.ToString()
To: @selectedDateRange?.EndDate.ToString()
```
```csharp
private BitDateRangePickerValue? selectedDateRange = new()
{
StartDate = new DateTimeOffset(2020, 1, 17, 0, 0, 0, DateTimeOffset.Now.Offset),
EndDate = new DateTimeOffset(2020, 1, 25, 0, 0, 0, DateTimeOffset.Now.Offset)
};
```
\n**Culture**:
```razor
Selected date range: from @(timeZoneDateRange1?.StartDate?.ToString() ?? "-") to @(timeZoneDateRange1?.EndDate?.ToString() ?? "-")
@{
TimeZoneInfo? timeZoneInfo = null;
var allTimeZones = TimeZoneInfo.GetSystemTimeZones();
if (allTimeZones.Count > 0)
{
timeZoneInfo = allTimeZones[0];
}
}
@if (timeZoneInfo is not null) {
"@timeZoneInfo.Id" TimeZone:
Selected date range: from @(timeZoneDateRange2?.StartDate?.ToString() ?? "-") to @(timeZoneDateRange2?.EndDate?.ToString() ?? "-")
}
```
```csharp
private BitDateRangePickerValue? timeZoneDateRange1 = new();
private BitDateRangePickerValue? timeZoneDateRange2 = new();
```
\n**Standalone**:
```razor
@culture.DateTimeFormat.GetAbbreviatedMonthName(context.Month)