How to enter a format number with a currency mask (Ionic)

I need to create a currency mask (from right to left) in the input field = number of my mobile application (Ionic + Cordova). If the user enters the value 123456, the input should be 1.234.56 (adding "," and "." Automatic).

I do not know how to do this with HTML and Javascript.

Does anyone help me?

Noting that the input type should be a "number" to show only the numeric keypad on the device.

Sorry my bad english

+4
source share
3 answers

look at these angular modules and directives:

http://aguirrel.imtqy.com/ng-currency/

jsfiddle.net/odiseo/dj6mX/

http://assisrafael.imtqy.com/angular-input-masks/

+2

jQuery jquery-numberformatter:

$(this).parseNumber({format:"#,###.00", locale:"us"});
+1

Source: https://habr.com/ru/post/1618646/


All Articles