EasyUI Forum
October 15, 2025, 10:36:05 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: numberbox + mobile device  (Read 11819 times)
rezzonico
Full Member
***
Posts: 186


View Profile
« 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
Logged
jarry
Administrator
Hero Member
*****
Posts: 2300


View Profile Email
« Reply #1 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>
Logged
rezzonico
Full Member
***
Posts: 186


View Profile
« Reply #2 on: June 28, 2024, 07:26:27 AM »

Thanks !

Regards
Miche
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!