ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How to enter numeric value with the shift key and with a french keyboard
Title:
B
I
{code}
?
I'm reporting a problem: I can't enter numeric values with the SHIFT key pressed (French keyboard) in a TextBoxFor. @(Html.Awe().TextBoxFor("NumericDec").Numeric(o => o.Decimals()).Value(1.2)) with a french keyboard the SHIFT key is used to access the numbers. So the TextBoxFor is unusable. The users of our website report the problem to us and we do not find the solution... I specify that we can enter the characters &é"'(-è_çà in a TextBoxFor formatted for numeric input ! Do you have a solution?
Save Changes
Cancel
Pascal
asked at 29 May 2020
Answers
B
I
{code}
?
please try to run this js after `AwesomeMvc.js` is included: awe.pnn = function(ev, oths) { var w = ev.which; var ekey = ev.key; if (ev.ctrlKey || oths.indexOf(w) + 1 || !isNaN(Number(ekey)) || ekey.length > 1) return; ev.preventDefault(); }
Save Changes
Cancel
Omu
answered at 02 Jun 2020
Great ! Thank you very much: it works !
at 02 Jun 2020
Pascal
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK