react-input-mask
react-input-mask copied to clipboard
Optional character in the middle (or prefix|suffix word)
Has anyone come across something like that?
I tried to create a mask that contemplates 123 hours
or 1234 hours
, but it seems not to work well:
const formatChars = {
"9": "[0-9]",
"?": "[0-9 ]"
};
const mask = value.length <= 9 ? "999? hours" : "9999 hours";
When I type 123
, it would be correct for the library to fill the rest of the field with hours
, but it only fills if I type 1234
.
Is my logic incorrect?
Any update on this issue? I have the same problem. In the old version, works fine.
up
up
Any update on this issue? I have the same problem