Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding the value of "00/00/0000" for the mask "M0/d0/0000" is considered valid? #1412

Open
abdulrahmanriyaz opened this issue Aug 5, 2024 · 1 comment

Comments

@abdulrahmanriyaz
Copy link

abdulrahmanriyaz commented Aug 5, 2024

🐞 bug report

Is this a regression?

Not sure.

Description

Its possible to add all zeroes in the date month format and it gets accepted as valid e.g with the mask
"M0/d0/0000" the value "00/00/0000" is considered valid. Do you know if this is intended behavior or is this a bug?

<input
placeholder="MM/dd/YYYY"
mask="M0/d0/0000"
[dropSpecialCharacters]="false"
[leadZeroDateTime]="true"
/>

🌍 Your Environment

Angular Version:


Package                         Version
---------------------------------------------------------
@angular/cli                    17.0.1
@angular/compiler-cli           17.0.3
ngx-mask                            ^18.0.0,
@propkitty
Copy link

I am also having this same problem. Also, if I specifically do the year as 0000 (with month and day correct), it changes the year to 1900 rather than letting me throw it invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants