Dot as a first character ( .90 ) with ngx-mask

107 views Asked by At

I was trying to use ngx-mask in Angular 15 application here is my textbox looks like

<input type="text" [(ngModel)]="sharePrice" mask="separator.4" separatorLimit="9999999999" [dropSpecialCharacters]="false">

I want to input .50 but if I am trying to enter that dot before 5 its not appearing. I needed to type 0 to make the dot appear in the textbox ( 0.50 ) but I want to put the dot and then 50 ( just .50 )

My ngx-mask version is 15.1

I am importing it in my app-module like

providers: [ provideNgxMask() ]

Am I making any mistake please help me out.

1

There are 1 answers

1
Thomas Van Beveren On

I recommend to use mask=".00".