-
Notifications
You must be signed in to change notification settings - Fork 300
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mask "0000-M0" is not handled correctly for month. #1298
Comments
* feat(ref: #1298, #1302, #1301): fix issues * fix(ref: #1292): fix percent mask with zero at start * fix(ref: no-ref): remove unusable code * fix(ref: no-ref): remove unusable code * fix(ref: no-ref): remove unusable code * fix(ref: no-ref): remove unusable code * fix(ref: no-ref): replace + into template string
@johanrg Thanks for using Ngx-mask. Please update to latest version. |
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 |
馃悶 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.
The text was updated successfully, but these errors were encountered: