Skip to main content
All docs
V25.1
  • DxDateRangePicker<T>.StartDateChanged Event

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

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

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

    Parameters

    Type Description
    T

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

    Remarks

    The StartDateChanged event allows you to handle changes to the component’s start 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 StartDateChanged event is handled automatically when you use two-way data binding for the StartDate property (@bind-StartDate).

    See Also