Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
610
Numeric format masks with commas for thousands
posted

I have an Angular 7 app using reactive forms with a numeric input box:

<input igxInput name="marketValue" type="number" formControlName="marketValue"/>

The users have requested to see commas every 1000 when they are typing in a large number. For example, 100,000,000.  Do you have any way to accomplish this?  Any help will be greatly appreciated.

 

Thanks as always,

JK

Parents
No Data
Reply
  • 1320
    Offline posted

    Hello Jeff,

    After investigating this further, I determined that your requirement could be achieved by setting a mask to the igxInput. The mask would accept only numbers and on every third number a comma would be set:

    <input #ssn name="number" type="text"

            igxInput

            [igxMask]="'000,000,000'"

            [(ngModel)]="number"

         />

    I have prepared a sample, demonstrating the described behavior. Please test it on your side and let me know if you need any further information regarding this matter.

    Regards,
    Monika Kirkova,
    Infragistics

Children