ng2-currency-mask not allowing '-' on empty textfield

Discussão em 'Angular' iniciado por Deepak Lalithkumar, Fevereiro 5, 2025.

  1. Angular 15.1.3 Node 18.11.9 ng2-currency-mask ^13.0.3

    ng2-currency-mask allows you to format numbers with current, rate with any prefix or suffix you want to add and also custom scaling and format.

    When dealing with negative values, it has a limitation, it would allow - only when you have entered any digit, it won't allow you to enter - on a empty text field.

    I tried creating a directive on keydown to allow - when values is empty, still no luck.

    Is there any way to allow - before entering the digits?

    If not, what is the alternative I can use for the above requirements?

    Continue reading...

Compartilhe esta Página