Error: More than one custom value accessor matches form control with unspecified name attribute
See original GitHub issueHey,
I 'm using the Angular 5.0 and Angular Material 2.0.0-beta.8, when i applied the ngx-mask within my custom component i got the below error
<md-input-container class="full-width">
<input mdInput [mdDatepicker]="datepicker" placeholder="Date" mask="00/00/0000" dropSpecialCharacters="false" [placeholder]="label"
[required]="required" [formControl]="formControl" />
<md-datepicker #datepicker></md-datepicker>
<span class="fa fa-calendar" mdPrefix> </span>
<md-error *ngIf="error">{{ error }}</md-error>
</md-input-container>
ng:///FormComponentsModule/DateComponent.ngfactory.js:36 ERROR Error: More than one custom value accessor matches form control with unspecified name attribute at _throwError (webpack-internal:///…/…/…/forms/esm5/forms.js:2463) at eval (webpack-internal:///…/…/…/forms/esm5/forms.js:2544) at Array.forEach (<anonymous>) at selectValueAccessor (webpack-internal:///…/…/…/forms/esm5/forms.js:2533) at new FormControlDirective (webpack-internal:///…/…/…/forms/esm5/forms.js:6463) at createClass (webpack-internal:///…/…/…/core/esm5/core.js:12363) at createDirectiveInstance (webpack-internal:///…/…/…/core/esm5/core.js:12206) at createViewNodes (webpack-internal:///…/…/…/core/esm5/core.js:13644) at callViewAction (webpack-internal:///…/…/…/core/esm5/core.js:14076) at execComponentViewsAction (webpack-internal:///…/…/…/core/esm5/core.js:13985)
It seems that the formControl attribut is causing the issue when removing it any clue to resolve the issue
Thanks and regards
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:17
Top Related StackOverflow Question
Please be respectful, this is open source work you don’t have to use.
@dgouissem We used ValueAccessor in our current realization, but angular have limitation -> we can use only one realization ValueAccessor. That why ngx-mask don’t work with material.