Skip to content
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

Does not work with Angular 12 #946

Closed
ssougnez opened this issue Nov 3, 2021 · 5 comments
Closed

Does not work with Angular 12 #946

ssougnez opened this issue Nov 3, 2021 · 5 comments

Comments

@ssougnez
Copy link

ssougnez commented Nov 3, 2021

🐞 bug report

Is this a regression?

No idea

Description

It simply does not work :-)
I tried with this code:

<input name="niss" type="text" formControlName="niss" mask="99.99.99-999.99" [showMaskTyped]="true" />

So nothing very fancy. At first, it seems to be working:

image

But as soon as I type something:

image
image

And at the end, the mask isn't even respected:

image

I'm surprised that I didn't find any issue relating to that because it simply nullifies the point of this library.

🔬 Minimal Reproduction

<input name="niss" type="text" formControlName="niss" mask="99.99.99-999.99" [showMaskTyped]="true" />

🔥 Exception or Error

None

🌍 Your Environment

Angular Version:

Angular CLI: 12.2.11
Node: 14.16.1
Package Manager: yarn 1.22.4
OS: win32 x64

Angular: 12.2.11
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1202.11
@angular-devkit/build-angular   12.2.11
@angular-devkit/core            12.2.11
@angular-devkit/schematics      12.2.11
@schematics/angular             12.2.11
rxjs                            6.6.7
typescript                      4.3.5
@89snake89
Copy link

Same problem using mask to mask a input test as date
<input name="dateOfBirth" type="text" formControlName="dateOfBirth" mask="99-99-9999" [showMaskTyped]="true" />

@ssougnez
Copy link
Author

By looking at the issue in this repository, it's clear that this library is not maintained anymore. I migrated to https://www.npmjs.com/package/@ngneat/input-mask which seems to perfectly fit the need and is actively maintained.

@SuperSoldado
Copy link

Don't works here as well. I'm using angular 12 and after installing, tons of compile errors appeared in my console. I even bother to ask for help, moving to other component like @ssougnez suggested.

@89snake89
Copy link

Yes I used the component suggested by @ssougnez
For input date mask worked perfectly on Angular 12

@NepipenkoIgor
Copy link
Collaborator

@ssougnez @89snake89 Thank you that shown this issues. Please try ngx-mask >= 14.2.2
Short demonstration https://stackblitz.com/edit/angular-material-13-starter-x1xj4z-tbuvib?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.module.ts,src%2Fapp%2Fapp.component.ts

@SuperSoldado
If you found some issues in your local environment please provide issue by template and also include your dependencies .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants