EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: rezzonico on June 25, 2024, 02:48:16 AM



Title: numberbox + mobile device
Post by: rezzonico on June 25, 2024, 02:48:16 AM
If you try the following program on a mobile device, you can insert characters and not only numbers.
I have tried it on Samsung Browser and Chrome.
https://www.jeasyui.com/demo/main/index.php?plugin=NumberBox&theme=material-teal&dir=ltr&pitem=&sort=asc

Is there a workaround to restrict the input to numbers ?

Miche


Title: Re: numberbox + mobile device
Post by: jarry on June 27, 2024, 08:30:31 PM
Please set the 'type' attribute with 'number' value to define the field for entering numbers with restrictions.

Code:
  <input id="nb" class="easyui-numberbox" label="Number:" labelPosition="top" precision="2" value="234.56" style="width:300px;">
  <script>
    $(function(){
      $('#nb').numberbox('textbox').attr('type','number')
    })
  </script>


Title: Re: numberbox + mobile device
Post by: rezzonico on June 28, 2024, 07:26:27 AM
Thanks !

Regards
Miche