Inputmask: datetime masking is still room for improvement ?

Created on 9 Nov 2020  路  7Comments  路  Source: RobinHerbots/Inputmask

When using the datetime mask , I'm confused about some of the input behavior.
Example: inputmask("datetime", {"placeholder": "dd/mm/yyyy", "inputFormat": "dd/mm/yyyy"}).mask('#myfield');

1, When I'm done typing "04/12/1879", click on the first character "0" and press "1".I want to get "14/12/1879", but I get "01/12/1879".
2: When I'm done typing "11/12/1879 ", click on the first character. Then press "0", I want to get "01/12/1879", but nothing changes. But if I press "2", l get "21/12/1879", which is a reasonable result.

  1. similarly, when the month value is "11", I can't change the first character with "0" unless I press the backspace key. when the month value is "01", when I press "1" at the "0" position, I don't get "11" , and the cursor moves to the year entry position
Dates

All 7 comments

I think it may relate to this issues https://github.com/RobinHerbots/Inputmask/issues/2289 and it is the same my case...
Any solution for that?

It is the same in my case. Are there any updates?

I have the same problem... Any idea on the plan for fixing it? @RobinHerbots

Same to my case. I have some days to debug the library. I think it's related to the logic of getTestTemplate, getTests functions. Hope that you have the plan to fix it @RobinHerbots

By the way, at first, zero is appended to the invalid day such as entering 4 as the first number in day and it appears 04 due to preValidation/postValidation in datetime alias definition

@sogoodgithub, @kenylieou, @tuanna8687 , @kylephp , @Quocnamit ,

Issue #2289 is fixed. And now this issue is on the radar ;-)

I expect to fix it next week.

Also #2435

Have a look at version 5.0.6-beta.29

Was this page helpful?
0 / 5 - 0 ratings