ngx-mask
ngx-mask copied to clipboard
Date mask with trailing dot (d0.M0.) can lead to doubled dots
🐞 bug report
Is this a regression?
No (I think)
Description
When using the date specialties (d0 + M0) with the German format of dots after them, there is a problem if a user only enters 2s. The month then is considered February, but when you keep typing, there is not only one dot appearing, but two.
Expected: 22.2. Actual: 22.2..
If you do this with a 3, it will only show as 3.3. and not let you continue to enter anything.
🔬 Minimal Reproduction
Stackblitz Example Please enter a lot of '2's in the field.
🌍 Your Environment
In my local environment I have this with [email protected] + [email protected] In stackblitz it is the same behaviour with [email protected] + [email protected]
Anything else relevant?
In my case, I can get around this issue by using leadZeroDateTime as you can see in the example.