Closed johanrg closed 2 months ago
@johanrg Thanks for using Ngx-mask. Please update to latest version. It example all work as expected - https://stackblitz.com/edit/stackblitz-starters-lnx1re?file=src%2Fmain.ts
Great! Thank you for fixing this bug.
I found a semi-related bug when testing, If you set the attribute [showMaskTyped]="true", it ignores the M0 limitation and allows you to set any value you want.
@johanrg Could you provide stackblitz with problem? If you u use [showMaskTyped]="true" with this mask u can add [leadZeroDateTime]="true", it will be add zero if month incorrect It example - https://stackblitz.com/edit/stackblitz-starters-4b4jpj?file=src%2Fmain.ts
This issue has been locked due to inactivity. Please file a new issue by teamplate if you are encountering a similar or related problem.
π bug report
The month can not be entered for a date sometimes when formatted as "0000-M0".
Description
As an example, trying to enter the date 1975-01 will only enter 1975-0, the 1 will not be entered.
There is a pattern here that is repeatable for all centuries where the year is greater than or equal to 32, and less than the next decade. As an example 1932 to 1939, 1942 to 1949 and all the way up to 1992-1999. Same with 1732, 1832, 2032 etc.
For each of those dates, only the first number of the month can be inserted.
π¬ Minimal Reproduction
https://angular-c8dqxg.stackblitz.io
π Your Environment
Angular Version:
Anything else relevant?
Using MacOS, tested with Chrome, Firefox and Safari.