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.
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:
https://github.com/joanpablo/reactive_forms/blob/94c928df929f3618d322c894e3d9aad5423ea1ac/lib/src/models/form_builder.dart#L223-L246
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.