JsDaddy / ngx-mask

Angular Plugin to make masks on form fields and html elements.
https://jsdaddy.github.io/ngx-mask
MIT License
1.16k stars 300 forks source link

ngx-mask - The date mask is broken #1193

Closed FractalMind closed 1 year ago

FractalMind commented 1 year ago

🐞 bug report

Is this a regression?

I don't know

Description

The mask will work as expected when the input is empty. But if you overwrite the date, the mask goes banana

🔬 Minimal Reproduction

  1. Go in your date demo https://jsdaddy.github.io/ngx-mask/

  2. Enter a date

  3. Correct the date

ngx-mask-enter-date enter: 10062023 enter: 11062023

1111 enter: 11111111 enter: 22222222

🌍 Your Environment

Angular Version:

"@angular/cdk": "15", "@angular/common": "^15.1.0", "@angular/core": "^15.1.0", "@angular/material": "15", "ngx-mask" : "^16.2.2",

Not working on Angular 16 either https://stackblitz.com/edit/stackblitz-starters-bauaai?file=src%2Fmain.ts

With love ❤️

andriikamaldinov1 commented 1 year ago

@FractalMind Thanks for your using Ngx-Mask. Please update to latest version. It example, all work as expected - https://stackblitz.com/edit/stackblitz-starters-1yfbym?file=src%2Fmain.ts