Closed mikerodonnell89 closed 5 years ago
To avoid errors you need to switch date: new FormControl({ date: null })
to date: new FormControl(null)
, in your example you initialise object instead of date, this one resolves dirty
and changes are detected.
For touched : '(blur)': this.onTouched()
I think the main problem here is the fact, that focus/focusout/blur events are fired only on specified html elements like a, input or buttons.
I think the best solution here would be to change event that calls onTouched() function. For example every time calendar closes, then onTouched should be called, or change (blur) to (click)
What do you think about it ?
Bug. Set up the DateTimePicker to get its data from a FormControl. Touched/dirty does not function properly, console errors
and
results in console errors. Expected behavior should be the same as date picker