Friday, March 26, 2010

How to remove thousandsSeparator from...

Hi,

I'm using NumberValidator to validate some user input to a TextInput. I'd like to disable the thousandsSeparator, but it's giving me trouble. Using '''' (empty string) there, makes the validation fail. I also tried using '' '' (space char) in there, which would be ok, but then I can't parse the string with parseFloat() function.

Any suggestions?

Thanks.

How to remove thousandsSeparator from...

I didn't find any direct way to do what I wanted. I solved the issue by creating a wrapper function for parseFloat that removes the white space (thousands separator) frrom the string before parsing.

No comments:

Post a Comment