diff --git a/BlazorAppTest/Pages/HxInputDate_Issue787_Test.razor b/BlazorAppTest/Pages/HxInputDate_Issue787_Test.razor new file mode 100644 index 000000000..5ef63d1ef --- /dev/null +++ b/BlazorAppTest/Pages/HxInputDate_Issue787_Test.razor @@ -0,0 +1,37 @@ +@page "/HxInputDate_Issue787_Test" +@using Havit; + +

HxInputDate[Range]

+ + + + + + +

OnFieldChanged counter: @counter

+ +@code { + + int counter; + private Person model; + private EditContext editContext; + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + model = new Person(); + editContext = new EditContext(model); + editContext.OnFieldChanged += HandleFieldChanged; + } + + private void HandleFieldChanged(object sender, EventArgs eventArgs) + { + counter += 1; + } + + public class Person + { + public DateTime BirthDate { get; set; } + public DateTimeRange DateRange { get; set; } + } +}