-
Notifications
You must be signed in to change notification settings - Fork 168
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
masking a datetime seems to go wrong #223
Comments
Not sure I understand? Can u add plunkr to show? |
"18.04.2018 11:57 PM" with a format of "dd.MM.yyyy hh:mm a" will become "18..0.4.20 18: 1 a" because the variable 'valueArrayIndex' will only be increased for characters found in the allowed characters. Just take any plnkr and slap the current datetimepicker library (2.6.2) on it: http://plnkr.co/edit/qTXYhDMtTzvK7UWlr3Fy?p=preview |
I would need to look at the code. Someone else created the pulse request for it |
@afro1114 ??? |
I believe we experienced a problem with the adjustment of this area of the code as well. A date format of M/d/yyyy will let dates with two digit months to pass the regex (since if you drop the first character from 12/3/2017 it will be 2/3/2017) but a date with two digit days fails this, since 4/17/2018 won't match d/d/dddd pattern - which arguably it should. (worked with 2.6.1). Perhaps I am misunderstanding the expectation of how the date format should work, but wanted to raise this case here in the event it's helpful. |
I have disabled masking as this seems to be causing issues for people. I have uploaded 2.6.3, hopefully this helps |
In version 2.6.2 the commit 71fb27f introduced a new function called 'applyMask'. The 'maskedValue' is checked against allowed characters and uses the mask character whenever one is found in the allowed characters and the actual value otherwise. In the latter case the counter isn't increased.
The text was updated successfully, but these errors were encountered: