This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 42084 - Entry Bound to a Double Does Not Accept ',' As Decimal Separator
Summary: Entry Bound to a Double Does Not Accept ',' As Decimal Separator
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 2.3.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-06-22 16:51 UTC by Jimmy
Modified: 2017-02-17 19:55 UTC (History)
5 users (show)

See Also:
Tags: ac
Is this bug a regression?: ---
Last known good build:


Attachments
repro solution (266.59 KB, application/zip)
2016-06-22 16:51 UTC, Jimmy
Details

Description Jimmy 2016-06-22 16:51:03 UTC
Created attachment 16442 [details]
repro solution

### Overview
When Entry.Text is bound to a double, it will not accept a comma as a decimal separator when the system is set to language where this is the standard.

The issue is harder to demonstrate on Android however, because of bug#42000. The numeric keyboard on Android does input the comma character even though it is shown on the keyboard regardless of system language.


### Steps to Reproduce
1. Configure device/emulator to locale that uses commas instead of periods for decimals, e.g. Swedish, German
2. Run the project
3. Enter a decimal number, e.g. “12,54”


### Expected Results
The Label below the Entry should display the same value as in the Entry


### Actual Results
Entering a comma followed by a digit causes the comma to disappear because the value is parsed with the comma being the group separator instead.


### Testing Info
Tested with Forms 2.3.0.49


### Workaround
The current workaround is to use a custom converter when setting the bindings, similar to the one provided here: http://stackoverflow.com/a/24448721/6457998
Comment 1 adrianknight89 2016-09-30 03:20:41 UTC
Can you update your sample? I noticed you're not using the converter.
Comment 2 adrianknight89 2016-09-30 03:40:00 UTC
Nevermind. You probably left it out intentionally. From the SO post, it looks like they are working on built-in conversions.

This PR should allow android keyboard to process all keys: https://github.com/xamarin/Xamarin.Forms/pull/396
Comment 3 Samantha Houts 2017-02-17 19:55:57 UTC
Should be fixed in 2.3.5-pre1. Thank you!

Note You need to log in before you can comment on or make changes to this bug.