Skip to main content

DxDateEdit<T>.DateChanged Event

Fires after a user changes a date in the Date Edit.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

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

Parameters

Type Description
T

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

Remarks

The DateChanged event allows you to handle changes to the selected date. The following code snippet enables the Update Date button once the Date Edit value is changed.

<DxDateEdit Date="@Date" DateChanged="@((DateTime newValue) => OnDateChanged(newValue))"></DxDateEdit>
<button type="button" class="btn btn-primary" disabled="@IsDisabled">Update Date</button>

@code {
    DateTime Date = DateTime.Today;
    bool IsDisabled = true;

    void OnDateChanged(DateTime newValue) {
        Date = newValue;
        if (newValue != DateTime.Today)
            IsDisabled = false;
        else IsDisabled = true;
    }
}

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

See Also