Reputation: 725
How is possible to use both decimal dot and thousands separator in input type="number"
, more specifically within AngularJS model? For example, the numeric value the user be able to write, should look like this: 3,597.50
. Also, I have to make a check if the entered data is a number or a string which I make with isNaN().
I tried someNumber.toFixed(2)
, where someNumber
is a variable, containing the number which the user has entered but it doesn't work.
Upvotes: 0
Views: 497
Reputation: 1296
Have you tried https://github.com/aguirrel/ng-currency ?
Its pretty decent...
Upvotes: 1