Describe the bug
Date mask throws an error when user tries to enter a 2-digit year into a 4-digit block.
Uncaught RangeError: Maximum call stack size exceeded
at get displayValue (/node_modules/imask/dist/imask.js:2202:21)
at MaskedRange._appendCharRaw (/node_modules/imask/dist/imask.js:2227:50)
at MaskedRange._appendCharRaw (/node_modules/imask/dist/imask.js:2535:24)
at MaskedRange._appendCharRaw (/node_modules/imask/dist/imask.js:2535:89)
at MaskedRange._appendCharRaw (/node_modules/imask/dist/imask.js:2535:89)
......
Expected behavior
Input field shoud reject user input or pad with apropriate digit like 1111 -> 1951
Environment:
"imask": "7.6.1"
"react-imask": "7.6.1"
Additional context
I want to additionally support 2-digit year in the date field. E.g. upon Enter check accepted value. If it's a 2-digit year convert it to a full year.
Not sure if related but getting the same error when entering a completely off value via autocomplete, like 12/3123211231_/yyyy on a Date mask (which I guess shouldn't even be allowed in the first place).
Describe the bug Date mask throws an error when user tries to enter a 2-digit year into a 4-digit block.
To Reproduce CodeSandbox Type
1.1.21
to the field.Expected behavior Input field shoud reject user input or pad with apropriate digit like
1111 -> 1951
Environment:
"imask": "7.6.1"
"react-imask": "7.6.1"
Additional context I want to additionally support 2-digit year in the date field. E.g. upon
Enter
check accepted value. If it's a 2-digit year convert it to a full year.