Inputmask: Currency mask enhancement

Created on 23 Jan 2015  路  7Comments  路  Source: RobinHerbots/Inputmask

Hi,

When user is editing a currency field, trying to edit 100,000.00 to 200,000.00.
They tend to erase off the the 1 and try to type in 2. But when they do that, we strip off all the zeros, which is sometimes frustrating to the user.

Instead of processing it as a number, it'd be great if we can process the input as a string, so as to retain leading zeros.

Numerics

All 7 comments

@SujayKrishna ,

You can overtype the 1 bu selecting it and typing 2. Or press the insert key and start typing

@RobinHerbots I completely understand.
But customers aren't happy when we ask them to work around issues.

It'd be great if we can fix this so that it'd still work like a regular input, just with additional masking.

@SujayKrishna ,

The zeroes are stripped in the canClearPosition of the numeric extensions.

I shall see if I can work it out without impacting other use cases of the numeric extension.

Thanks so much.

Any workarounds for this issue?

any news? :'(

I've addressed this issue by overwriting the onBeforeWrite method for my currency mask. It is this method that strips all leading zeroes from your input.

{
  mask : 'currency',
  onBeforeWrite: () => {}
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

kolyabokov picture kolyabokov  路  5Comments

subarachnid picture subarachnid  路  3Comments

webmastervinay picture webmastervinay  路  4Comments

RobinHerbots picture RobinHerbots  路  4Comments

drolsen picture drolsen  路  3Comments