ngx-currency icon indicating copy to clipboard operation
ngx-currency copied to clipboard

Decimal input using numeric pad's dot as decimal separator

Open fergardi opened this issue 3 years ago • 1 comments

Hello! Nice plugin!

I was wondering if it is possible to introduce a float number using the keyboard's numeric pad dot as decimal separator, even if I can configure the decimal separator to be the colon instead. Currently it only works if I press the colon key of the letters keyboard.

image

From this image, If I press '.' it does nothing, If I press ',' it jumps into the decimal section. I need it to accept the numeric pad '.' key.

This is my setup:

NgxCurrencyModule.forRoot({
      align: "right",
      allowNegative: false,
      allowZero: true,
      decimal: ",",
      precision: 2,
      prefix: "",
      suffix: "",
      thousands: ".",
      nullable: true,
      min: undefined,
      max: undefined,
      inputMode: CurrencyMaskInputMode.NATURAL,
}),

Thanks in advance.

fergardi avatar May 19 '21 14:05 fergardi

I believe this has something to do with https://github.com/nbfontana/ngx-currency/pull/78 but I cannot make it work.

fergardi avatar May 19 '21 15:05 fergardi