Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxDateEdit<T>.Date Property

Specifies the component’s value.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public T Date { get; set; }

#Property Value

Type Description
T

A date.

#Remarks

The Date Edit component supports the following data types:

Use the Date property to specify the editor’s value or bind this value to a data field:

Razor
<DxDateEdit Date="new DateTime(2019, 08, 13)" />

<DxDateEdit @bind-Date="@DateTimeValue" />

@code {
      DateTime DateTimeValue { get; set; } = DateTime.Today;
}

Run Demo: Date Edit

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

The default minimum and maximum values are System.DateTime.MinValue and System.DateTime.MaxValue.

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 Date Edit keeps the previously selected date.
  • You can set the Date property to a date outside the date range. In this case, the Date Edit displays the date as is, and the editor’s calendar displays the closest available date.
Razor
<DxDateEdit Date="DateTime.Today"
            MinDate="@(new DateTime(2020, 06, 11))" 
            MaxDate="@(new DateTime(2020, 06, 25))" />

The maximum date

Run Demo: Date Edit — Date Range

Handle the DateChanged event to respond to a date change.

View Example: Grid for Blazor - Implement a date range filter

See Also