-
Notifications
You must be signed in to change notification settings - Fork 70
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
Allow special chars by choice #58
Comments
Please check the PR which should solve this issue :) |
@michaelworm Have you tried the |
@changhuixu it's not about filling these keys into the input as a value but for my usecase I am using these keys to trigger actions like saving or jumping to another field. Since only numbers are allowed to pass through and any other keypress is denied, I can't get this working without allowing specific keys as you can see in the commit. |
I see. |
I won't be able to add one soon, could you do it? Thanks in advance. |
Sorry, your pull request didn't work on my end. Could you try again? <section>
<h3><code>digitOnly</code> directive: allow Specific Keys</h3>
<label for="digit-only-allow-keys">
Digit Only input allows keypress of specific keys
</label>
<input
id="digit-only-allow-keys"
type="text"
name="calculate"
placeholder="00"
inputmode="numeric"
pattern="[0-9]*"
digitOnly
allowKeys="Slash,BracketRight,NumpadAdd,NumpadSubtract"
/>
</section> |
Thanks for the great and easy to use plugin but I am missing some key feature. How can I accomplish to allow some special chars like
+
or-
keys? I tried allowing them via regex^[\d +-]+$
in the pattern attribute, but this doesn't seem to work. Any tips?The text was updated successfully, but these errors were encountered: