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: CONFIRMED
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 [MSFT]
Modified: 2017-10-23 16:01 UTC (History)
7 users (show)

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 [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 42084 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Jimmy [MSFT] 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 [MSFT] 2017-02-17 19:55:57 UTC
Should be fixed in 2.3.5-pre1. Thank you!
Comment 4 Saurabh Paunikar 2017-07-05 12:21:25 UTC
On xamarin.form version 2.3.5.256-pre6 observed that after selecting Swedish language.
Entering a comma followed by a digit causes the comma to disappear on iOS simulator.
hence reopening the issue.

Screencast link : https://www.screencast.com/t/GxHDzG8gb