Skip to main content
All docs
V24.1

DxDateRangePicker<T>.EndDateChanged Event

Fires after a user changes the end date in the Date Range Picker.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public EventCallback<T> EndDateChanged { get; set; }

Parameters

Type Description
T

A delegate method that accepts the end date value as a parameter.

Remarks

The EndDateChanged event allows you to handle changes to the component’s end date.

<DxDateRangePicker StartDate="@modelStartDate" 
                   EndDate="@modelEndDate"
                   StartDateChanged="@((DateTime newStartDate) => OnStartDateChanged(newStartDate))"
                   EndDateChanged="@((DateTime newEndDate)=> OnEndDateChanged(newEndDate))" />
<p></p>
@Alert_StartDate
<p></p>
@Alert_EndDate

@code {
    DateTime modelStartDate=DateTime.Today;
    DateTime modelEndDate = DateTime.Today.AddDays(7);
    string Alert_StartDate { get; set; }
    string Alert_EndDate { get; set; }

    void OnStartDateChanged(DateTime newStartDate) {
        modelStartDate = newStartDate;
        Alert_StartDate = "The start date changed:" + newStartDate;
    }

    void OnEndDateChanged(DateTime newEndDate) {
        modelEndDate = newEndDate;
        Alert_EndDate = "The end date changed:" + newEndDate;
    }
}

The EndDateChanged event is handled automatically when you use two-way data binding for the EndDate property (@bind-EndDate).

See Also