fixup number-only event verifier to allow enter
This commit is contained in:
parent
5174fa0b61
commit
d00df353d8
|
@ -69,6 +69,7 @@
|
|||
}
|
||||
|
||||
function validateKeypress(e: KeyboardEvent) {
|
||||
if (e.charCode === 13) { return; }
|
||||
if (e.charCode < 47 || e.charCode > 57) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
});
|
||||
|
||||
function validateInput(e: KeyboardEvent) {
|
||||
if (e.charCode === 13) { return; }
|
||||
if (e.charCode < 47 || e.charCode > 57) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue