Skip to main content
All docs
V24.2

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

DxDateRangePicker<T>.MaxDate Property

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public DateTime MaxDate { get; set; }

#Property Value

Type Description
DateTime

A DateTime value that specifies the maximum date.

#Remarks

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

Razor
<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