Closed yarseyah closed 9 months ago
Note that the InputDate
correctly marks the form as dirty, e.g. in my example, replace the FluentTextField
and FluentDatePicker
with the following:
<InputDate @bind-Value=model.DateTime />
<InputText @bind-Value=model.Name />
Yields the following expected behaviour:
🐛 Bug Report
When a
FluentDataPicker
is used within anEditForm
, which is bound to a defaultnull
value, selecting a date does not mark the field/form as dirty.💻 Repro or Code Sample
🤔 Expected Behavior
form.EditContext?.IsModified()
should returntrue
, which is what happens when theName
field in example is modified.😯 Current Behavior
Form with Name changed
[reset] form with DateTime selected
💁 Possible Solution
🔦 Context
I need to know whether the form has been modified as part of the validation to enable/disable other aspects, including custom validation, without this trigger, it isn't possible to determine if the user has changed/selected a DateTime.
The same lack of
IsModified
can be seen on the specific field, e.g.form?.EditContext?.IsModified(() => Model.DateTime)
🌍 Your Environment