dynamicinputnumberformatter
v1.0.5
Published
Format number input dynamically as the user types
Downloads
16
Maintainers
Readme
What is this?
Dynamic Input Number Formatter
NPM installation
npm install dynamicinputnumberformatter --save
import {formatInputNumber} from 'dynamicinputnumberformatter/index.js';
formatInputNumber(id); //for one input
formatInputNumber(id1,id2); //for multiple inputs
CDN
<script src='https://cdn.jsdelivr.net/gh/mwasigala/DynamicInputNumberFormatter.js@latest/index.min.js'></script> //minified
<script src='https://cdn.jsdelivr.net/gh/mwasigala/DynamicInputNumberFormatter.js@latest/index.js'></script>
Example
formatInputNumber('input-money');
formatInputNumber('input-money','input-quantity');
Note
Input type must be text.
<input type='text'>