Skip to main content
All docs
V24.1

DxDateRangePicker<T>.MinDate Property

Specifies the minimum date that can be selected in the Date Range Picker.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

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

Property Value

Type Description
DateTime

A DateTime value that specifies the minimum date.

Remarks

You can use the MinDate and MaxDate properties to limit the available date range.

<DxDateRangePicker @bind-StartDate="@DateTimeStart"
                   @bind-EndDate="@DateTimeEnd"
                   MinDate="@MinDate"
                   MaxDate="@MaxDate"/>

@code {
    DateTime DateTimeStart { get; set; } = DateTime.Today;
    DateTime DateTimeEnd { get; set; } = DateTime.Today.AddDays(7);
    DateTime MinDate { get; set; }
    DateTime MaxDate { get; set; }
    protected override void OnInitialized() {
        MinDate = DateTimeStart.AddDays(-7);
        int days = DateTime.DaysInMonth(DateTimeStart.Year, DateTimeStart.Month);
        MaxDate = new DateTime(DateTimeStart.Year, DateTimeStart.Month, days).AddDays(14);
    }
}

Run Demo: Range of Available Dates

See Also