using pattern mask, format character is not applied if it's the last character in pattern #598
Replies: 5 comments 2 replies
-
for now i can only suggest something ugly like https://jsfiddle.net/x8dnmqju/1/ |
Beta Was this translation helpful? Give feedback.
-
@uNmAnNeR thanks for the example. I'll explore using that workaround for the time being. |
Beta Was this translation helpful? Give feedback.
-
@showell215 give a try |
Beta Was this translation helpful? Give feedback.
-
Thanks @uNmAnNeR – It does not work quite as expected if my pattern includes optional characters like in this example. Would it be possible to have |
Beta Was this translation helpful? Give feedback.
-
hey! for now if i input the value will be:
if eager should not consider optionals as you suggest then there are two ways:
First is not a solution because optionals should not be skipped until user wants to do it. I suggest you to use dynamic mask for your case https://jsfiddle.net/f0pqL71o/ It does not work right now (haha, sorry) but i will fix it soon. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
If I have a simple pattern like
mask: "00'"
(two numbers plus'
), the'
character does not get appended after typing the two numbers. Instead I have to input a 3rd character for it to be applied, which a user would not expect to be required.lazy: false
is not ideal for my use case.To Reproduce
Simple example here
Expected behavior
After inputing two valid characters and reaching the end of the input, any remaining format characters are applied.
Environment:
Additional context
Thanks for all your work on this library!
Beta Was this translation helpful? Give feedback.
All reactions