Hi

I would like to create a textfield that can receive in input only numbers
and a comma. The dots should be added automatically like this: 123456 =
123.456.

But if i use a comma the result shoud be this one: 123456,789123 =
123.456,789123 (no dots after the comma)

I'm extending the textfield class and i'm using the numberFormat class to
format the number.
The problem is that i'm catching the "input" event and then format the
string, but the number is not formatted. 

I need also to change the separator, in the documentation i've seen that the
separators are the opposite of what i need: "Whether thousand groupings
should be used {e.g. “1,432,234.65”}."

There's a good way to accomplish this ?

I'm using a filter to let only numbers be entered into the field:
this.setFilter(/[0-9]/); but i need to make possible also to enter a comma
(not more than one). I need a better regexp.

Thank you all for your support, I'm not very good with regexp. :)

-----
La coincidenza non ha madre.
--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Number-formatting-and-separators-tp6776330p6776330.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Why Cloud-Based Security and Archiving Make Sense
Osterman Research conducted this study that outlines how and why cloud
computing security and archiving is rapidly being adopted across the IT 
space for its ease of implementation, lower cost, and increased 
reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to