Date & Time

The FluentCalendar and FluentDatePicker components are not yet fully compatible with the EditForm and FluentEditForm elements. 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

Example
August 2025
S
M
T
W
T
F
S
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6

Selected

Panel 2025-08-10

2025
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec

Selected

Panel 2025-08-10

2025 - 2036
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036

Selected

Panel 2025-08-10

Download: 

Customized calendar

Example
August 2025
S
M
T
W
T
F
S
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6

Selected date

Download: 

Selection

Example

Single

August 2025
S
M
T
W
T
F
S
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6

Selected days:

Range

August 2025
S
M
T
W
T
F
S
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6

Selected days:

    Range with "SelectOneWeek"

    August 2025
    S
    M
    T
    W
    T
    F
    S
    27
    28
    29
    30
    31
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    1
    2
    3
    4
    5
    6

    Selected days:

      Multiple (max 5 days)

      August 2025
      S
      M
      T
      W
      T
      F
      S
      27
      28
      29
      30
      31
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      1
      2
      3
      4
      5
      6

      Selected days:

        Multiple with "Select3Days"

        August 2025
        S
        M
        T
        W
        T
        F
        S
        27
        28
        29
        30
        31
        1
        2
        3
        4
        5
        6
        7
        8
        9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        1
        2
        3
        4
        5
        6

        Selected days:

          Download: 

          Culture

          Example
          مرداد 1404
          ش
          ی
          د
          س
          چ
          پ
          ج
          28
          29
          30
          31
          1
          2
          3
          4
          5
          6
          7
          8
          9
          10
          11
          12
          13
          14
          15
          16
          17
          18
          19
          20
          21
          22
          23
          24
          25
          26
          27
          28
          29
          30
          31
          1
          2
          3
          4
          5
          6
          7

          Selected date

          August 2025
          S
          M
          T
          W
          T
          F
          S
          27
          28
          29
          30
          31
          1
          2
          3
          4
          5
          6
          7
          8
          9
          10
          11
          12
          13
          14
          15
          16
          17
          18
          19
          20
          21
          22
          23
          24
          25
          26
          27
          28
          29
          30
          31
          1
          2
          3
          4
          5
          6
          Download: 

          ReadOnly calendar with 2-digits and using French Culture

          Example
          Août 2025
          L
          M
          M
          J
          V
          S
          D
          28
          29
          30
          31
          01
          02
          03
          04
          05
          06
          07
          08
          09
          10
          11
          12
          13
          14
          15
          16
          17
          18
          19
          20
          21
          22
          23
          24
          25
          26
          27
          28
          29
          30
          31
          01
          02
          03
          04
          05
          06
          07
          Download: 

          Default Date Picker

          Example

          Double-click the text field to set Today's date

          Selected Date: 2025-08-08

          Download: 

          Default Time Picker

          Example

          Selected Time:

          Download: 

          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="...".

          Example
          
              <FluentDatePicker Value="@MyDate.ToDateTime()"
                                ValueChanged="@(e => MyDate = e.ToDateOnly())" />
              @code {
                  private DateOnly MyDate = DateOnly.FromDateTime(DateTime.Today);
              }
          

          Conversion examples

          Example
          Date: 2025-08-10 Time: 15:52
          Date: 2025-08-10 Time: 15:52
          Date: 2025-08-10 Time: 15:52
          Date: 2025-08-10 Time: 15:52
          Download: 

          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
          AnimatePeriodChangesbool?
          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.
          AriaLabelstring?
          Gets or sets the text used on aria-label attribute.
          Autofocusbool
          False
          Determines if the element should receive document focus on page load.
          CheckIfSelectedValueHasChangedbool
          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.
          CultureCultureInfo
          Gets or sets the culture of the component.
          By default System.Globalization.CultureInfo.CurrentCulture to display using the OS culture.
          DayFormatDayFormat?
          Numeric
          Gets or sets the Type style for the day (numeric or 2-digits).
          DaysTemplateRenderFragment<FluentCalendarDay>?
          Defines the appearance of a Day cell.
          Disabledbool
          False
          Disables the form control, ensuring it doesn't participate in form submission.
          DisabledCheckAllDaysOfMonthYearbool
          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).
          DisabledDateFuncFunc<DateTime, bool>?
          Function to know if a specific day must be disabled.
          DisabledSelectablebool
          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.
          DisplayNamestring?
          Gets or sets the display name for this field.
          This value is used when generating error messages when the input value fails to parse correctly.
          Embeddedbool
          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.
          FieldFieldIdentifier?
          Gets or sets the FluentInputBase.FieldIdentifier that identifies the bound value.
          If set, this parameter takes precedence over FluentInputBase.ValueExpression.
          Immediatebool
          False
          Change the content of this input field when the user write text (based on 'OnInput' HTML event).
          ImmediateDelayint
          0
          Gets or sets the delay, in milliseconds, before to raise the FluentInputBase.ValueChanged event.
          Labelstring?
          Gets or sets the text to label the input.
          This is usually displayed just above the input
          LabelTemplateRenderFragment?
          Gets or sets the content to label the input component.
          This is usually displayed just above the input
          Namestring?
          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.
          PickerMonthDateTime
          8/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.
          Placeholderstring?
          Gets or sets the short hint displayed in the input before the user enters a value.
          ReadOnlybool
          False
          When true, the control will be immutable by user interaction. readonly HTML attribute for more information.
          Requiredbool
          False
          Gets or sets a value indicating whether the element needs to have a value.
          SelectDatesHoverFunc<DateTime, IEnumerable<DateTime>>?
          Fired when the selected mouse over change, to display the future range of dates.
          SelectedDatesIEnumerable<DateTime>
          Gets or sets the list of all selected dates, only when FluentCalendar.SelectMode is set to CalendarSelectMode.Range or CalendarSelectMode.Multiple.
          SelectModeCalendarSelectMode
          Single
          Gets or sets the way the user can select one or more dates
          ValueDateTime?
          Gets or sets the value of the input. This should be used with two-way binding.
          ValueExpressionExpression<Func<DateTime?>>?
          Gets or sets an expression that identifies the bound value.
          ViewCalendarViews
          Days
          Defines the appearance of the FluentCalendar component.

          EventCallbacks

          Name
          Type
          Description
          PickerMonthChangedEventCallback<DateTime>
          Fired when the display month changes.
          SelectedDatesChangedEventCallback<IEnumerable<DateTime>>
          Fired when the selected dates change.
          ValueChangedEventCallback<DateTime?>
          Gets or sets a callback that updates the bound value.

          Methods

          Name
          Parameters
          Type
          Description
          FocusAsyncvoid
          Exposes the elements FocusAsync(bool preventScroll) method.
          FocusAsyncbool 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
          AppearanceFluentInputAppearance
          Outline
          Gets or sets the design of this input.
          AriaLabelstring?
          Gets or sets the text used on aria-label attribute.
          Autofocusbool
          False
          Determines if the element should receive document focus on page load.
          CheckIfSelectedValueHasChangedbool
          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.
          CultureCultureInfo
          Gets or sets the culture of the component.
          By default System.Globalization.CultureInfo.CurrentCulture to display using the OS culture.
          DayFormatDayFormat?
          Numeric
          Gets or sets the Type style for the day (numeric or 2-digits).
          DaysTemplateRenderFragment<FluentCalendarDay>?
          Defines the appearance of a Day cell.
          Disabledbool
          False
          Disables the form control, ensuring it doesn't participate in form submission.
          DisabledCheckAllDaysOfMonthYearbool
          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).
          DisabledDateFuncFunc<DateTime, bool>?
          Function to know if a specific day must be disabled.
          DisabledSelectablebool
          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.
          DisplayNamestring?
          Gets or sets the display name for this field.
          This value is used when generating error messages when the input value fails to parse correctly.
          DoubleClickToDateDateTime?
          Gets or sets a value which will be set when double-clicking on the text field of date picker.
          Embeddedbool
          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.
          FieldFieldIdentifier?
          Gets or sets the FluentInputBase.FieldIdentifier that identifies the bound value.
          If set, this parameter takes precedence over FluentInputBase.ValueExpression.
          Immediatebool
          False
          Change the content of this input field when the user write text (based on 'OnInput' HTML event).
          ImmediateDelayint
          0
          Gets or sets the delay, in milliseconds, before to raise the FluentInputBase.ValueChanged event.
          Labelstring?
          Gets or sets the text to label the input.
          This is usually displayed just above the input
          LabelTemplateRenderFragment?
          Gets or sets the content to label the input component.
          This is usually displayed just above the input
          Namestring?
          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.
          Openedbool
          False
          Placeholderstring?
          Gets or sets the short hint displayed in the input before the user enters a value.
          PopupHorizontalPositionHorizontalPosition?
          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.
          ReadOnlybool
          False
          When true, the control will be immutable by user interaction. readonly HTML attribute for more information.
          Requiredbool
          False
          Gets or sets a value indicating whether the element needs to have a value.
          ValueDateTime?
          Gets or sets the value of the input. This should be used with two-way binding.
          ValueExpressionExpression<Func<DateTime?>>?
          Gets or sets an expression that identifies the bound value.
          ViewCalendarViews
          Days
          Defines the appearance of the FluentCalendar component.

          EventCallbacks

          Name
          Type
          Description
          OnCalendarOpenEventCallback<bool>
          raised when calendar popup opened
          OnDoubleClickEventCallback<MouseEventArgs>
          Command executed when the user double-clicks on the date picker.
          PickerMonthChangedEventCallback<DateTime>
          Fired when the display month changes.
          ValueChangedEventCallback<DateTime?>
          Gets or sets a callback that updates the bound value.

          Methods

          Name
          Parameters
          Type
          Description
          FocusAsyncvoid
          Exposes the elements FocusAsync(bool preventScroll) method.
          FocusAsyncbool 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
          AppearanceFluentInputAppearance
          Outline
          Gets or sets the design of this input.
          AriaLabelstring?
          Gets or sets the text used on aria-label attribute.
          Autofocusbool
          False
          Determines if the element should receive document focus on page load.
          Disabledbool
          False
          Disables the form control, ensuring it doesn't participate in form submission.
          DisplayNamestring?
          Gets or sets the display name for this field.
          This value is used when generating error messages when the input value fails to parse correctly.
          Embeddedbool
          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.
          FieldFieldIdentifier?
          Gets or sets the FluentInputBase.FieldIdentifier that identifies the bound value.
          If set, this parameter takes precedence over FluentInputBase.ValueExpression.
          Immediatebool
          False
          Change the content of this input field when the user write text (based on 'OnInput' HTML event).
          ImmediateDelayint
          0
          Gets or sets the delay, in milliseconds, before to raise the FluentInputBase.ValueChanged event.
          Labelstring?
          Gets or sets the text to label the input.
          This is usually displayed just above the input
          LabelTemplateRenderFragment?
          Gets or sets the content to label the input component.
          This is usually displayed just above the input
          Namestring?
          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.
          Placeholderstring?
          Gets or sets the short hint displayed in the input before the user enters a value.
          ReadOnlybool
          False
          When true, the control will be immutable by user interaction. readonly HTML attribute for more information.
          Requiredbool
          False
          Gets or sets a value indicating whether the element needs to have a value.
          TimeDisplayTimeDisplay
          HourMinute
          Gets or sets the time format.
          ValueDateTime?
          Gets or sets the value of the input. This should be used with two-way binding.
          ValueExpressionExpression<Func<DateTime?>>?
          Gets or sets an expression that identifies the bound value.

          EventCallbacks

          Name
          Type
          Description
          ValueChangedEventCallback<DateTime?>
          Gets or sets a callback that updates the bound value.

          Methods

          Name
          Parameters
          Type
          Description
          FocusAsyncvoid
          Exposes the elements FocusAsync(bool preventScroll) method.
          FocusAsyncbool preventScroll
          void
          Exposes the elements FocusAsync(bool preventScroll) method.
          TwoDigit
          Numeric
          Single
          Range
          Multiple
          Days
          Months
          Years
          Filled
          Outline
          TwoDigit
          Numeric
          Unset
          Start
          End
          Left
          Right
          Center
          Days
          Months
          Years
          Filled
          Outline
          HourMinute
          HourMinuteSeconds
          An error has occurred. This application may no longer respond until reloaded. Reload 🗙