Skip to content

Commit

Permalink
Merge pull request #797 from xmartlabs/fix/decimals
Browse files Browse the repository at this point in the history
Fix decimal number formatting. closes #514
  • Loading branch information
mats-claassen committed Jun 2, 2016
2 parents f30fa9b + d8b67b5 commit 9a2bdf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion XLForm/XL/Cell/XLFormTextFieldCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ - (void)textFieldDidChange:(UITextField *)textField{
if (!didUseFormatter)
{
if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeNumber] || [self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeDecimal]){
self.rowDescriptor.value = @([self.textField.text doubleValue]);
self.rowDescriptor.value = [NSDecimalNumber decimalNumberWithString: self.textField.text];
} else if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeInteger]){
self.rowDescriptor.value = @([self.textField.text integerValue]);
} else {
Expand Down

0 comments on commit 9a2bdf1

Please sign in to comment.