-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: More than one custom value accessor matches form control with unspecified name attribute #50
Comments
@dgouissem Thanks, we will check |
@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. |
I have the same problem when try to use mask in combination with bsDatepicker.
|
There is a workaround solution not using ngx-mask library |
Still the recommended option is not to use this library ? |
still not fix here? |
[UPDATE] Basically use Racoon mask instead of ngx-mask |
Could you please add this as a big disclaimer in the documentation? |
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. |
I manage to create a workaround that works perfectly based on my expectation. I created a hidden input that handles the datepicker, the mask itself is attached to the actual input that is visible and added a event listener EDIT: I also added the positionTarget input to make the datepicker look that its been initialized in the actual input <div class="input-group">
<input type="text" class="form-control" #startDateInput id="startDate" formControlName="startDate" [leadZeroDateTime]="true" mask="d0/M0/0000" />
<input type="hidden" (dateSelect)="onDateSelect($event, 'startDate')" ngbDatepicker #start="ngbDatepicker" [positionTarget]="startDateInput">
<button class="btn" (click)="start.toggle()" type="button">
<i class="mdi mdi-calendar"></i>
</button>
</div> onDateSelect(date: NgbDate, key: string): void {
const formControl: any = {};
formControl[key] = this.dateAdapter.toModel(date);
this.form.patchValue(formControl);
} |
there's another way here too: ng-bootstrap/ng-bootstrap#2291 (comment). |
Please, can you help me. |
May I ask if what is the status of this issue? I wish to implement a proper solution, not a workaround although it is working fine.
Thank you. |
Same issue here :/ |
Has anyone found a simpler solution? |
There is no simple solution |
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
It seems that the formControl attribut is causing the issue when removing it any clue to resolve the issue
Thanks and regards
The text was updated successfully, but these errors were encountered: