EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Alfred on April 26, 2018, 12:58:50 AM



Title: Numeric Keypad not work in the newly added plugin MaskedBox
Post by: Alfred on April 26, 2018, 12:58:50 AM
Why is numeric keypad entry disabled in MaskedBox?


Title: Re: Numeric Keypad not work in the newly added plugin MaskedBox
Post by: jarry on April 26, 2018, 05:15:15 PM
Please put this code to the page to solve this issue.
Code:
<script type="text/javascript">
(function($){
var keydownHandler = $.fn.maskedbox.defaults.inputEvents.keydown;
$.extend($.fn.maskedbox.defaults.inputEvents, {
keydown: function(e){
if (e.keyCode >= 96 && e.keyCode <= 105){
e.keyCode -= 48;
}
return keydownHandler.call(this,e);
}
})
})(jQuery);
</script>

Or download a newer version from https://www.jeasyui.com/download/v155.php


Title: Re: Numeric Keypad not work in the newly added plugin MaskedBox
Post by: Alfred on April 26, 2018, 08:20:24 PM
Thanks for the fixed. Easyui is becoming friendly days by days.