-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get the value from the last character to left. #13
Comments
I believe there is a |
thanks @iamdustan yes, But I do need the mask, but I need only the ones that are to the left of my last character, that's why in my example I get only one the |
Just to let you know, I achieved this by doing some crazy hack, here's the snippet: var instance = new InputMask({pattern: mask, value});
value.split('').forEach(s => instance.input(s));
const {end} = instance.selection;
return instance.getValue().slice(0, end); Basically, I manually After that I get the Still I'd like to know if there's a better approach :) |
Hey, the title might seem a little confusing, but an example can make it very clear. Let's say I have the following pattern:
If I use the
getValue
method, I get the string'11/1_/____'
.Is there a way to get only the characters from the last 1 to the left? it would return something like this:
11/1
thanks.
The text was updated successfully, but these errors were encountered: