-
Notifications
You must be signed in to change notification settings - Fork 3
jQuery numericinput decimals
Maikel Bos edited this page Feb 11, 2020
·
1 revision
By default, jQuery-numericinput creates an input that allows and shows numbers with 2 decimal digits. To control the number of decimal digits, you can use the attribute data-decimal-digits
. If you want to allow integer values only, set this to 0. Below example displays 4 decimal digits.
<input type="text" id="example-numericinput" data-decimal-digits="4" />
<script type="text/javascript">
$('#example-numericinput').numericinput();
</script>
For information on how to change the decimal separator, see localization options.