I am using a HTML5 input box with type="number"
. Regarding to some documentations, it should be possible to enter a number with comma (not with period) if I also use the lang=""
attribute. It is working in Firefox, but not in Chrome (does not accept a comma). How can I get Chrome to accept the comma in the input box.
My problem is that our German users expect that they can enter a comma instead of a period there.
https://jsfiddle.net/byte2702/y3Lpfw7m/
Please enter a number with comma: <br/>
<input id="num" type="number" step="any" lang="de" pattern="-?[0-9]+[\,.]*[0-9]+" />
type="number"
input field. Ref: https://mcmap.net/q/194975/-how-to-force-keyboard-with-numbers-in-mobile-website-in-android/1066234 – Underpinninginput
should always accept period and comma. -- Update, submitted: bugs.chromium.org/p/chromium/issues/detail?id=793673 – Underpinning