Jump to content

Recommended Posts

Posted
Has anyone have the code to change point of numeric keyboard to comma?
 
It must be code from client side, but I can't code that correctly. 
 
I have put the next code at clientEvents -> extEvents -> onKeyPress, and point is correctly cleared, but i can't know how put the comma.

 

function keypress(sender, e, eOpts)
{
    if(e.keyCode == '46' || e.charCode == '46')
    { 
        //Cancel the keypress
        e.preventDefault(); 
        //e.KeyCode = '44';
        // Add the comma to the value of the input field
        //sender.val(sender.val() + ',');
     }
}

 thanks

Posted

Hi, 

 

try this, 

 

if (code==46) {
      
      var val = sender.getValue() ; 
      sender.setValue(val + ',') ;
      e.stopEvent() ;
   } 

 

 

Regards

Posted

Hi, 

 

try this, 

 

if (code==46) {
      
      var val = sender.getValue() ; 
      sender.setValue(val + ',') ;
      e.stopEvent() ;
   } 

 

 

Regards

Hi

 

I only change (code==46) with (e.keyCode == '46' || e.charCode == '46') and his work perfectly.
 
Thanks a lot  :)

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...