You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, the validators are missing for DateTime and TimeOfDay.
I understand that with the callbacks ReactiveDatePicker supports to only let the user select valid dates, there are use cases where the control could be invalid.
My use case for example is, that I load old data for migration and it could be, that a date is not in the required range anymore, so the user must select a new one.
It would be nice, if the alternative syntax could respect the validator settings as well.
The text was updated successfully, but these errors were encountered:
Hi,
I've been trying out reactive_forms and I possibly stumbled upon a little issue: I want to add a validator to a DateTime field.
Using
fb
andFormControl
I created the form this way:This works as expected and my form goes into invalid state when I select a date before the current date.
However, if I create the form this way:
It's not working anymore, the validator does not get executed.
I did a quick debug session and I possibly found a place:
reactive_forms/lib/src/models/form_builder.dart
Lines 223 to 246 in 94c928d
As you can see, the validators are missing for
DateTime
andTimeOfDay
.I understand that with the callbacks
ReactiveDatePicker
supports to only let the user select valid dates, there are use cases where the control could be invalid.My use case for example is, that I load old data for migration and it could be, that a date is not in the required range anymore, so the user must select a new one.
It would be nice, if the alternative syntax could respect the validator settings as well.
The text was updated successfully, but these errors were encountered: