When a DatePicker input is cleared by using the keyboard and the control loses focus, the state of a non-nullable DateTime property is inconsistent with the control.
This behavior is appropriate; however, it can cause user confusion when the underlying value is used to query for data based on a value the user no longer sees.
My proposed solution (bug fix) is to return the value of the DatePicker to the last known good value when the control loses focus.
StateHasChanged() by itself does not cause a re-render of the component, however changing the @key value of the DatePicker does.
See this REPL for a demonstration of the issue and workaround/fix: https://blazorrepl.telerik.com/czEjvVlK18i471S622
When I have a DatePicker and it's DateOnly value is default, the control displays 1/1/2001 instead of either nothing, a placeholder, or the correct value.
The image above shows the DatePicker value and the current value in the model underneath.
Please advise.