Is there a consistent way across browsers to hide the new spin boxes that some browsers (such as Chrome) render for HTML input of type number? I am looking for a CSS or Jav
Maybe change the number input with javascript to text input when you don't want a spinner;
document.getElementById('myinput').type = 'text';
and stop the user entering text;
document.getElementById('myinput').onkeydown = function(e) {
if(!((e.keyCode > 95 && e.keyCode < 106)
|| (e.keyCode > 47 && e.keyCode < 58)
|| e.keyCode == 8
|| e.keyCode == 9)) {
return false;
}
}
then have the javascript change it back in case you do want a spinner;
document.getElementById('myinput').type = 'number';
it worked well for my purposes