Error: More than one custom value accessor matches form control with unspecified name attribute

See original GitHub issue

Hey,

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>&nbsp;</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:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:17

github_iconTop GitHub Comments

54reactions
Markus-Endecommented, Aug 20, 2020

if it was to not work, why did you guys build it!!!wtf

Please be respectful, this is open source work you don’t have to use.

40reactions
NepipenkoIgorcommented, Jan 3, 2018

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 2 multiple custom value accessor - Stack Overflow
ERROR : More than one custom value accessor matches form control with unspecified name attribute. Is there a way to do this kind...
Read more >
more than one custom value accessor matches form control ...
More than one custom value accessor matches form control with unspecified name attribute ... The problem here is: the ngx mask and angular...
Read more >
ore than one custom value accessor matches form control with ...
When you get the error No value accessor for form control with unspecified name attribute , there are generally two things that possibly...
Read more >
More than one custom value accessor matches form control ...
More than one custom value accessor matches form control with unspecified name attribute #30 · Describe the bug · Minimal Reproduction · Expected...
Read more >
angular/material2 - Gitter
because of the "More than one custom value accessor matches form control with unspecified name attribute" error. woowe. @woowe.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found