Title: NumberBox input how to replace dot with a comma Post by: peterg on February 12, 2013, 04:30:20 AM Hi, i try to use this great project in a German business app.
The NumberBox works fine for display the numbers as we needed. By typing in the <input> field with a German keyboard we have a comma "," on the keyboard nunberblock. How to chance it to accept the comma at type in and replace(',' , '.') for use in code. it is necessary to use jQuery EasyUI in most European countries. ahead thanks for a hint. Peter Title: Re: NumberBox input how to replace dot with a comma Post by: stworthy on February 12, 2013, 05:52:41 PM To allow inputting comma, rebind the 'keypress.numberbox' event for the input element.
Code: <input id="nn" class="easyui-numberbox" data-options="decimalSeparator:','"> Code: $('#nn').numberbox().unbind('keypress.numberbox').bind('keypress.numberbox',function(e){ Title: Re: NumberBox input how to replace dot with a comma Post by: peterg on February 13, 2013, 01:28:41 PM thanks it work.
i place the code in $(document).ready(function() Code: $(document).ready(function() { it don’t work in "easyui-layout" loadet files. called with Code: function center37(){ $('#p').panel('refresh','include/NumberBox.php'); } I see a lot to learn for me. can i have a hint please |