frios Posted November 17, 2013 Posted November 17, 2013 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 Quote
rullomare Posted November 17, 2013 Posted November 17, 2013 Hi, try this, if (code==46) { var val = sender.getValue() ; sender.setValue(val + ',') ; e.stopEvent() ; } Regards Quote
frios Posted November 18, 2013 Author Posted November 18, 2013 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.