From 9ebff91db0ff73fff693d975df4b65be9ad49583 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 5 Aug 2016 15:12:36 -0500 Subject: [PATCH] Allow negative sign, decimal point for "numeric" text fields --- tailbone/static/js/numeric.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tailbone/static/js/numeric.js b/tailbone/static/js/numeric.js index 50bf5eb0..31573ce5 100644 --- a/tailbone/static/js/numeric.js +++ b/tailbone/static/js/numeric.js @@ -19,6 +19,12 @@ function key_modifies(event) { } else if (event.which >= 96 && event.which <= 105) { // Numeric (10-Key) return true; + } else if (event.which == 173) { // hyphen (negative sign) + return true; + + } else if (event.which == 190) { // period/decimal + return true; + } else if (event.which == 8) { // Backspace return true;