Skip to content

Pressing clear on DateInput does not fire a value changed event. #424

Open
@rainfallgames

Description

@rainfallgames

Describe the bug

Selecting a date in the DateInput fires a changed event.
Clearing the date from the DateInput does not fire an event.

Expected behavior
A change event should fire.

Sample code

<DateInput id="dateTime" Placeholder="Date:" @bind-Value="@dateTime"/>

@code {
    private EditContext editContext;

    private DateTime? dateTime;

    protected override void OnInitialized()
    {
        editContext = new EditContext(Query);
        editContext.OnFieldChanged += HandleFieldChanged;

        async void HandleFieldChanged(object? sender, FieldChangedEventArgs args)
        { 
            // Do something.
        }
    }
}

Desktop (please complete the following information):

  • OS: Windows
  • Browser Firefox
  • Version - Blazor.Bootstrap 1.10.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions