Back to Devexpress

DxDateEdit<T>.MinDate Property

blazor-devexpress-dot-blazor-dot-dxdateedit-1-2026a8c4.md

latest2.9 KB
Original Source

DxDateEdit<T>.MinDate Property

Specifies the minimum date that can be selected in the Date Edit.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public DateTime MinDate { get; set; }

Property Value

TypeDescription
DateTime

A DateTime value that specifies the minimum date.

|

Remarks

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))" />

Run Demo: Date Edit — Date Range

If the component’s Date property is bound to DateTimeOffset or nullable < DateTimeOffset> object, the component ignores the Offset part and compares the DateTime part of DateTimeOffset values to the MinDate property value.

In scroll picker mode, the Date Edit component shows a notification message each time a user tries to navigate to a date that is out of the range. To customize the notification text, use the OutOfRangeNotificationText property.

See Also

DxDateEdit<T> Class

DxDateEdit<T> Members

DevExpress.Blazor Namespace