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  :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...