I want to format my textinput value like this
1
10
100
1,000
10,000
1,00,000
how can I achieve that can anyone please tell me?
I want to format my textinput value like this
1
10
100
1,000
10,000
1,00,000
how can I achieve that can anyone please tell me?
Use Int.NumberFormat
JavaScript API to format Indian Rupees values.
for eg-
const formatter = new Intl.NumberFormat('en-IN', {maximumSignificantDigits: 3 })
console.log(formatter.format(1));
console.log(formatter.format(10));
console.log(formatter.format(10000));
console.log(formatter.format(100000));