Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:decimal only for part of the world #22

Open
jeanmartin opened this issue Nov 19, 2015 · 2 comments
Open

:decimal only for part of the world #22

jeanmartin opened this issue Nov 19, 2015 · 2 comments

Comments

@jeanmartin
Copy link

Using the :decimal type in countries that use ',' as the decimal seperator (instead of '.') causes the value to be truncated (2,75 => 2.00).

According to http://stackoverflow.com/questions/11487850/decimal-point-in-uikeyboardtypedecimalpad-cant-be-used-in-mathematical-calculat a localizedScannerWithString (NSScanner) would need to be used. I however have no idea where to apply this.

@jeanmartin
Copy link
Author

To reproduce simply switch the settings in your simulator to e.g. "Germany". Now the keypad for :decimal will display a ',' as the separator. Enter "2,74" and then leave the field, it will now show "2".

@bmichotte
Copy link
Owner

You're right. Looking at https://github.com/xmartlabs/XLForm/blob/master/XLForm/XL/Cell/XLFormTextFieldCell.m#L278 the only think it does is a doubleValue

I guess it's more a XLForm issue. Maybe you can report it on their repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants