Date & Time
The FluentCalendar and FluentDatePicker components are not yet fully compatible with theEditFormandFluentEditFormelements. Some functionalities, such as error messages, the requirement message or the validation messages are missing.
The <FluentCalendar> is an implementation of a month calendar display leveraging the Fluent UI design system.
It allows for setting selected and/or disabled dates and can handle a click on a day event (if not ReadOnly)
The <FluentDatePicker> is an input field that shows a calendar dropdown to select a date.
The <FluentTimePicker> allows for picking a specific time of day by selecting hour, minutes and AM/PM
note: FluentCalendar and FluentDatePicker are not yet fully compatible with accessibility.
Examples
Default calendar
Selected
Panel 2025-11-15
Selected
Panel 2025-11-15
Selected
Panel 2025-11-15
Customized calendar
Selected date
Selection
Single
Selected days:
Range
Selected days:
Range with "SelectOneWeek"
Selected days:
Multiple (max 5 days)
Selected days:
Multiple with "Select3Days"
Selected days:
Culture
Selected date
ReadOnly calendar with 2-digits and using French Culture
Default Date Picker
Selected Date: 2025-11-13
Default Time Picker
Selected Time:
DateOnly, TimeOnly bindings
By design, the DatePicker component uses a Value property of type DateTime?
To facilitate binding to a DateOnly type, you can use the methods
ToDateTime and ToDateOnly methods.
If your variable is of type Nullable<DateTime>, you can continue
to use @bind-Value.
For other types, you must use the syntax value="..." ValueChanged="...".
<FluentDatePicker Value="@MyDate.ToDateTime()"
ValueChanged="@(e => MyDate = e.ToDateOnly())" />
@code {
private DateOnly MyDate = DateOnly.FromDateTime(DateTime.Today);
}
Conversion examples
ToTimeAgo() method
An extension method ToTimeAgo(TimeSpan delay) returns a string with one of these samples, depending of the delay.- Just now
- 25 seconds ago
- 14 minutes ago
- 9 hours ago
- 1 day ago
- 5 days ago
- 6 months ago
- 2 years ago
Documentation
FluentCalendar Class
Inherits from FluentCalendarBase.
There might be parameters and/or methods shown here that are inherited from the component's base type but are not applicable to this component.
Parameters
Name | Type | Default | Description |
|---|---|---|---|
AnimatePeriodChanges | bool? | Gets ot sets if the calendar items are animated during a period change. By default, the animation is enabled for Months views, but disabled for Days and Years view. | |
AriaLabel | string? | Gets or sets the text used on aria-label attribute. | |
Autofocus | bool | False | Determines if the element should receive document focus on page load. |
CheckIfSelectedValueHasChanged | bool | True | Gets or sets the verification to do when the selected value has changed. By default, ValueChanged is called only if the selected value has changed. |
Culture | CultureInfo | Gets or sets the culture of the component. By default System.Globalization.CultureInfo.CurrentCulture to display using the OS culture. | |
DayFormat | DayFormat? | Numeric | Gets or sets the Type style for the day (numeric or 2-digits). |
DaysTemplate | RenderFragment<FluentCalendarDay>? | Defines the appearance of a Day cell. | |
Disabled | bool | False | Disables the form control, ensuring it doesn't participate in form submission. |
DisabledCheckAllDaysOfMonthYear | bool | False | By default, the FluentCalendarBase.DisabledDateFunc check only the first day of the month and the first day of the year for the Month and Year views.Set this property to `true` to check if all days of the month and year are disabled (more time consuming). |
DisabledDateFunc | Func<DateTime, bool>? | Function to know if a specific day must be disabled. | |
DisabledSelectable | bool | True | Apply the disabled style to the FluentCalendarBase.DisabledDateFunc days.If this is not the case, the days are displayed like the others, but cannot be selected. |
DisplayName | string? | Gets or sets the display name for this field. | |
Embedded | bool | False | Gets or sets if the derived component is embedded in another component. If true, the ClassValue property will not include the EditContext's FieldCssClass. |
Field | FieldIdentifier? | Gets or sets the FluentInputBase that identifies the bound value.If set, this parameter takes precedence over FluentInputBase. | |
Immediate | bool | False | Change the content of this input field when the user write text (based on 'OnInput' HTML event). |
ImmediateDelay | int | 0 | Gets or sets the delay, in milliseconds, before to raise the FluentInputBase event. |
Label | string? | Gets or sets the text to label the input. This is usually displayed just above the input | |
LabelTemplate | RenderFragment? | Gets or sets the content to label the input component. This is usually displayed just above the input | |
Name | string? | Gets or sets the name of the element. Allows access by name from the associated form. ⚠️ This value needs to be set manually for SSR scenarios to work correctly. | |
PickerMonth | DateTime | 11/1/2025 12:00:00 AM | Gets or sets the current month of the date picker (two-way bindable). This changes when the user browses through the calendar. The month is represented as a DateTime which is always the first day of that month. You can also set this to determine which month is displayed first. If not set, the current month is displayed. |
Placeholder | string? | Gets or sets the short hint displayed in the input before the user enters a value. | |
ReadOnly | bool | False | When true, the control will be immutable by user interaction. readonly HTML attribute for more information. |
Required | bool | False | Gets or sets a value indicating whether the element needs to have a value. |
SelectDatesHover | Func<DateTime, IEnumerable<DateTime>>? | Fired when the selected mouse over change, to display the future range of dates. | |
SelectedDates | IEnumerable<DateTime> | Gets or sets the list of all selected dates, only when FluentCalendar.SelectMode is set to CalendarSelectMode.Range or CalendarSelectMode.Multiple. | |
SelectMode | CalendarSelectMode | Single | Gets or sets the way the user can select one or more dates |
Value | DateTime? | Gets or sets the value of the input. This should be used with two-way binding. | |
ValueExpression | Expression<Func<DateTime?>>? | Gets or sets an expression that identifies the bound value. | |
View | CalendarViews | Days | Defines the appearance of the FluentCalendar component. |
EventCallbacks
Name | Type | Description |
|---|---|---|
PickerMonthChanged | EventCallback<DateTime> | Fired when the display month changes. |
SelectedDatesChanged | EventCallback<IEnumerable<DateTime>> | Fired when the selected dates change. |
ValueChanged | EventCallback<DateTime?> | Gets or sets a callback that updates the bound value. |
Methods
Name | Parameters | Type | Description |
|---|---|---|---|
FocusAsync | void | Exposes the elements FocusAsync(bool preventScroll) method. | |
FocusAsync | bool preventScroll | void | Exposes the elements FocusAsync(bool preventScroll) method. |
FluentDatePicker Class
Inherits from FluentCalendarBase.
There might be parameters and/or methods shown here that are inherited from the component's base type but are not applicable to this component.
Parameters
Name | Type | Default | Description |
|---|---|---|---|
Appearance | FluentInputAppearance | Outline | Gets or sets the design of this input. |
AriaLabel | string? | Gets or sets the text used on aria-label attribute. | |
Autofocus | bool | False | Determines if the element should receive document focus on page load. |
CheckIfSelectedValueHasChanged | bool | True | Gets or sets the verification to do when the selected value has changed. By default, ValueChanged is called only if the selected value has changed. |
Culture | CultureInfo | Gets or sets the culture of the component. By default System.Globalization.CultureInfo.CurrentCulture to display using the OS culture. | |
DayFormat | DayFormat? | Numeric | Gets or sets the Type style for the day (numeric or 2-digits). |
DaysTemplate | RenderFragment<FluentCalendarDay>? | Defines the appearance of a Day cell. | |
Disabled | bool | False | Disables the form control, ensuring it doesn't participate in form submission. |
DisabledCheckAllDaysOfMonthYear | bool | False | By default, the FluentCalendarBase.DisabledDateFunc check only the first day of the month and the first day of the year for the Month and Year views.Set this property to `true` to check if all days of the month and year are disabled (more time consuming). |
DisabledDateFunc | Func<DateTime, bool>? | Function to know if a specific day must be disabled. | |
DisabledSelectable | bool | True | Apply the disabled style to the FluentCalendarBase.DisabledDateFunc days.If this is not the case, the days are displayed like the others, but cannot be selected. |
DisplayName | string? | Gets or sets the display name for this field. | |
DoubleClickToDate | DateTime? | Gets or sets a value which will be set when double-clicking on the text field of date picker. | |
Embedded | bool | False | Gets or sets if the derived component is embedded in another component. If true, the ClassValue property will not include the EditContext's FieldCssClass. |
Field | FieldIdentifier? | Gets or sets the FluentInputBase that identifies the bound value.If set, this parameter takes precedence over FluentInputBase. | |
Immediate | bool | False | Change the content of this input field when the user write text (based on 'OnInput' HTML event). |
ImmediateDelay | int | 0 | Gets or sets the delay, in milliseconds, before to raise the FluentInputBase event. |
Label | string? | Gets or sets the text to label the input. This is usually displayed just above the input | |
LabelTemplate | RenderFragment? | Gets or sets the content to label the input component. This is usually displayed just above the input | |
Name | string? | Gets or sets the name of the element. Allows access by name from the associated form. ⚠️ This value needs to be set manually for SSR scenarios to work correctly. | |
Opened | bool | False | |
Placeholder | string? | Gets or sets the short hint displayed in the input before the user enters a value. | |
PopupHorizontalPosition | HorizontalPosition? | Gets or sets an HorizontalPosition for the popup displayed when the user open the calendar.By default, this value is Left or Right, depending of the 'CurrentUICulture.TextInfo.IsRightToLeft' value. | |
ReadOnly | bool | False | When true, the control will be immutable by user interaction. readonly HTML attribute for more information. |
Required | bool | False | Gets or sets a value indicating whether the element needs to have a value. |
Value | DateTime? | Gets or sets the value of the input. This should be used with two-way binding. | |
ValueExpression | Expression<Func<DateTime?>>? | Gets or sets an expression that identifies the bound value. | |
View | CalendarViews | Days | Defines the appearance of the FluentCalendar component. |
EventCallbacks
Name | Type | Description |
|---|---|---|
OnCalendarOpen | EventCallback<bool> | raised when calendar popup opened |
OnDoubleClick | EventCallback<MouseEventArgs> | Command executed when the user double-clicks on the date picker. |
PickerMonthChanged | EventCallback<DateTime> | Fired when the display month changes. |
ValueChanged | EventCallback<DateTime?> | Gets or sets a callback that updates the bound value. |
Methods
Name | Parameters | Type | Description |
|---|---|---|---|
FocusAsync | void | Exposes the elements FocusAsync(bool preventScroll) method. | |
FocusAsync | bool preventScroll | void | Exposes the elements FocusAsync(bool preventScroll) method. |
FluentTimePicker Class
Inherits from FluentInputBase<>.
There might be parameters and/or methods shown here that are inherited from the component's base type but are not applicable to this component.
Parameters
Name | Type | Default | Description |
|---|---|---|---|
Appearance | FluentInputAppearance | Outline | Gets or sets the design of this input. |
AriaLabel | string? | Gets or sets the text used on aria-label attribute. | |
Autofocus | bool | False | Determines if the element should receive document focus on page load. |
Disabled | bool | False | Disables the form control, ensuring it doesn't participate in form submission. |
DisplayName | string? | Gets or sets the display name for this field. | |
Embedded | bool | False | Gets or sets if the derived component is embedded in another component. If true, the ClassValue property will not include the EditContext's FieldCssClass. |
Field | FieldIdentifier? | Gets or sets the FluentInputBase that identifies the bound value.If set, this parameter takes precedence over FluentInputBase. | |
Immediate | bool | False | Change the content of this input field when the user write text (based on 'OnInput' HTML event). |
ImmediateDelay | int | 0 | Gets or sets the delay, in milliseconds, before to raise the FluentInputBase event. |
Label | string? | Gets or sets the text to label the input. This is usually displayed just above the input | |
LabelTemplate | RenderFragment? | Gets or sets the content to label the input component. This is usually displayed just above the input | |
Name | string? | Gets or sets the name of the element. Allows access by name from the associated form. ⚠️ This value needs to be set manually for SSR scenarios to work correctly. | |
Placeholder | string? | Gets or sets the short hint displayed in the input before the user enters a value. | |
ReadOnly | bool | False | When true, the control will be immutable by user interaction. readonly HTML attribute for more information. |
Required | bool | False | Gets or sets a value indicating whether the element needs to have a value. |
TimeDisplay | TimeDisplay | HourMinute | Gets or sets the time format. |
Value | DateTime? | Gets or sets the value of the input. This should be used with two-way binding. | |
ValueExpression | Expression<Func<DateTime?>>? | Gets or sets an expression that identifies the bound value. |
EventCallbacks
Name | Type | Description |
|---|---|---|
ValueChanged | EventCallback<DateTime?> | Gets or sets a callback that updates the bound value. |
Methods
Name | Parameters | Type | Description |
|---|---|---|---|
FocusAsync | void | Exposes the elements FocusAsync(bool preventScroll) method. | |
FocusAsync | bool preventScroll | void | Exposes the elements FocusAsync(bool preventScroll) method. |