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
<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>
formatInputNumber('input-money');
formatInputNumber('input-money','input-quantity');
Input type must be text.
<input type='text'>