ngx-mask
ngx-mask copied to clipboard
Date formatting does not work correctly if month is placed before day
🐞 bug report
Is this a regression?
NoDescription
mask value d0/M0/0000 works as expected, with either one or two digits allowed in the month and day positions, however if the mask is written as M0/d0/0000 then one or two digits are allowed in the first (month) position, but one digit is not allowed in the day position and the input refuses to take the '/' delimiter until a second digit is entered🔬 Minimal Reproduction
https://stackblitz.com/edit/ngx-mask-qqyxzi?file=src/app/app.component.html🌍 Your Environment
Angular Version:
11.0.4
also observed in 10.x.x
Is there any update on this issue? This is a big problem if you can't use month/day/year format
Having the same problem!
I can confirm this issue with Angular 15 and date formats like 0000-M0-d0. In Angular 14 this was still working properly.
@mounitsyna @cmb0335 @randysimplist @elementalPRESS
Thank you for using ngx-mask. Please update ngx-mask to latest version.
https://stackblitz.com/edit/angular-awcvr8?file=src%2Fmain.ts
@andriikamaldinov1 if using Angular 13, planning to move to Angular 14, 15, 16 and beyond, replacing some other mask lib that is deprecated. How can I get this to work with "M0/d0/0000" without upgrading to latest?