I'm using jQuery plugin jStepper in my MVC app for restricting a text box to numeric values.
allowDecimals = false and
decimalSperator = "," are not working.
I have tried like this
<input type="text" id="txtnum">
$("[id$='txtnum']").jStepper({ allowDecimals: false,disableNonNumeric:true,minDecimals: 0, minValue: 1, maxValue: 99, minLength: 2 });
Except allowDecimals everything is working fine..
I have tried to create onStep function,even it is not working
$("[id$='txtnum']").jStepper({ onStep: allowdec });
function allowdec(objTextField,bDirection,bLimitReached) {
if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')
}
function allowdec(){alert("hai")} is also not working
Thanks for any help.