I would like to add a reactive form control over a form and an error is triggered:
More than one custom value accessor matches form control with unspecified name attribute
Everything works separately, reactive form validation, mask or matDatepicker, any couple combination also works, but the three together prompt the error.
Here is my code:
In component.ts
formGroup = new FormGroup({
date: new FormControl()
});
In component.html
<mat-form-field>
<input type="text" matInput [matDatepicker]="date_picker" mask="d0/M0/0000" formControlName="date">
<mat-datepicker-toggle matSuffix [for]="date_picker"></mat-datepicker-toggle>
<mat-datepicker #date_picker></mat-datepicker>
</mat-form-field>
I'm using:
"@angular/cli": "8.3.19"
"ngx-mask": "8.1.7"
"@angular/material": "8.2.3"