0

I am trying to use ngx-mask to complete this task. Almost there, but i am not able to figure it out the last part.

So i have following input:

<input
    type="text"
    mask="00.00"
    placeholder="00.00"
    [allowNegativeNumbers]="false"
    [(ngModel)]="amount"
    [showMaskTyped]="true"
    placeHolderCharacter="0"
  />

So when i enter for example:

  • 7654 => input display: 76.54 (correct)
  • 7000 => input display: 70.00 (correct)
  • 8 => input display 80.00 => not quite right for my case, i am expecting 08.00.
  • What mask should i set in order to have all 3 example display correctly ? I have tried these masks so far : '0*.00', '0.00' ... but none working.

Any suggestion? Thank you

daniel8x
  • 990
  • 4
  • 16
  • 34

0 Answers0