Skip to main content

DxCalendar<T>.SelectedDate Property

Specifies the selected date.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public T SelectedDate { get; set; }

Property Value

Type Description
T

The data type.

Remarks

Use the SelectedDate property to specify a selected date or to bind the date to a model’s field. The calendar supports DateTime and Nullable DateTime data types.

<DxCalendar @bind-SelectedDate="@SelectedDate" />

@code{
    DateTime SelectedDate { get; set; } = DateTime.Now;
}

The SelectedDateChanged event occurs each time the selection changes.

To enable multiple date selection in the calendar, set the EnableMultiSelect property to true. The SelectedDates collection stores all the selected dates.

Use the MinDate and MaxDate properties to specify a range of available dates. The calendar disables dates that are out of the range and hides navigation arrows for them.

Note

  • The maximum date should be greater than the minimum date. Otherwise, an exception occurs.
  • If a user types a date that is out of the range, the calendar keeps the previously selected date.
  • You can set the SelectedDate and SelectedDates properties to dates outside the range.
<DxCalendar T="DateTime" MinDate="@(new DateTime(2020, 06, 11))" MaxDate="@(new DateTime(2020, 06, 25))" />
See Also