Closed Maw-Jung closed 6 years ago
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 By debugging into the function when selecting any date you can see the described result
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 71fb27f190c49b17d325a4ffc2ad18ea8c4a4c79 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.