Allow decimalChar ',' insted '.'


Hi guys.

How i can change the keyboardType=‘number’ in a or , to allow decimalChar == ‘,’ (Locale PT_BR or nl_NL) instead default ‘.’ ?
I tried to change the field in TS to String, tried to change locale in app.module (LOCALE_ID),
tried to install plugin , without success.



I don’t think you can modify a specific key in keyboard but just use the set of options provided by platform. At least in Android these are the available input types, may I know which one you are looking for?


Thank’s for reply, manojdcoder.

I’ve tried that, but Android only permit user to press ‘.’ button. When press ‘,’ button, the numericKeyboard ignores the value. In pt_BR locale, char ‘,’ is used as decimal part from Number.

On another Angular 2 WebApp, have solved this using component (ng2-currency-mask, URL

I think if is possible change the locale in Nativescript Core, this can be solved.

Anyway, we are using full keyboard, users claim to change to NumericKeyboard, in the future, perhaps ?



In that case you can use the same masked textfield in NativeScript - :sunglasses: