Ionic – issue with currency / decimal data

Ionic natively doesn’t provide any graceful input component for capturing user input for currency or decimal data (with defined precision and separator). With native , capturing user input in decimal format can get ugly, prone to validation errors and of course not a great user experience. <ion-input placeholder=”\$0.00″ inputmode=”decimal” [(ngModel)]=”entry” name=”amount”>

As we see here, with no input restrictions & validations, obvious difference in what we expected and what we got, that’s hell of a creative user. There are couple of solution packages available, which helps you get the desired result to some extent: but nothing fits right & meet the expectation truly. It adds more complexity to a simple problem, and yet not providing 100% satisfaction. Angular does provide currency pipe for formatted display of amount, that is very useful but doesn’t help with capturing input.

Leave a Comment

Your email address will not be published. Required fields are marked *