Skip to content

Support radix (decimal point) for shortcuts with digits: 0 #2851

@spovich

Description

@spovich

Hi, amazing library! Thank you for it!

I'd like to use inputmask for very large inputs (millions) where users don't want cents (only dollars). To accomplish this I set the mask to digits: 0. However, I also want to use shortcuts so user can enter 15.6m ($15,600,000) but the digits: 0 prevents entering the radix (.).

I can make the shortcuts work fine if I set digits: 1 (or 2), but that is not desirable since it shows cents.

Is this possible?

My current workaround is to remove the mask on focus, and then re-add the mask on blur/submit. However, with this approach I lose the most of the goodness of inputmask, so not great.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions