fabiomcosta / mootools-meio-mask

A mootools plugin for creating masked input texts

Home Page:http://meiocodigo.com/projects/moomeiomask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

new feature: reverse mask should have the decimal part optional

fdp opened this issue · comments

commented

Create a mask for currency Euro (please add Euro inside your source code)

Meio.Mask.createMasks('Reverse', {
'Euro': {
symbol: 'Eur ', thousands: '.', decimal: ','
}
});

I need a mask that work even if no deciaml is typed

example1 (it now works this way):
user types 12345 the input is filled with 123,45

example2 (my request)
user types 12345 i need the field filled with € 12345,00 (default decimal part is 00)

example3 (my request)
user types 123 then he types the decimal char and then he types 45
the field is filled with € 123,45

actually the user is forced to input the decimal part, it should be optional

I'm still in doubt if this is natural for the users...

Ok this is kinda old, I'll close it but if you think we really should implement this feel free to re-open it again.

I do feel it should be implemented. If the user pastes an integer number, it should be exactly what (s)he pasted. Pasting 12345 should yield 12345 or, at the worst, 12345,00
And if I have a fractional number, say 1234,5, then pasting it should not convert it to 123,45. This is plain wrong and makes the particular mask unusable in many scenarios.