Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9067

Re: how to make textfield to take only numbers, & it wont allow us to enter any other characters

$
0
0

Hi Dennis,

 

Thanks for your reply

 

But i want it for TextField

i.e., var input= new sap.ui.commons.TextField({

            liveChange:function(){

              var val = this.getValue();

              val= val.replace(/[^\d]g,");

              this.setValue(val);

              }

   });

 

 

your code is working fine with sap.m.Input but not for sap.ui.commons.TextField

can you please help me?


Viewing all articles
Browse latest Browse all 9067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>