using comma in numeric field

Topics: Customizing Orchard
Jul 25, 2012 at 10:33 PM

hi,

  I installed the italian Language pack, and I created a content type with a numeric field. I added two decimals, but i cannot use comma as decimal separator, and even point give me problem.

  how can i solve this?

Coordinator
Jul 26, 2012 at 2:52 PM

Please check that the current culture is Italian when the number gets parsed. If you don't have any module implementing ICultureSelector, it probably isn't.

Developer
Jul 26, 2012 at 4:49 PM

I opened a bug : http://orchard.codeplex.com/workitem/18866 

The Numeric field should use the current culture to validate the decimal format when you edit it and display it in the Driver, as the DateTime Field does. 

Coordinator
Jul 26, 2012 at 5:06 PM

Thanks!

Jul 26, 2012 at 6:01 PM

if you're interested, i have checked: the problem is with chrome.

Working with ie it works, but with chrome i have this problem, i can send you the screenshot if you need

 

<fieldset style="vertical-align: baseline; white-space: normal; text-transform: none; word-spacing: 0px; color: #333333; outline-width: 0px; padding-bottom: 0px; padding-top: 6px; font: 13px/20px 'Segoe UI', Trebuchet, Arial, sans-serif; outline-style: none; padding-left: 0px; clear: both; margin: 0px 0px 12px; orphans: 2; widows: 2; letter-spacing: normal; outline-color: invert; padding-right: 0px; background-color: #ffffff; text-indent: 0px; border: #dbdbdb 0px solid;"><label style="font-size: 13px; font-family: inherit; vertical-align: baseline; font-weight: normal; outline-width: 0px; padding-bottom: 0.3em; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; display: block; outline-color: invert; padding-right: 0px; border: 0px;" for="Brano_PrezzoMp3_Value">PrezzoMp3</label><input id="Brano_PrezzoMp3_Value" class="input-validation-error text-small" style="font-family: inherit; width: 4em; border: #bdbcbc 1px solid; padding: 3px;" name="Brano.PrezzoMp3.Value" type="text" value="1,39" /> The value '1.39' is not valid for Value.</fieldset>

 

<fieldset style="vertical-align: baseline; white-space: normal; text-transform: none; word-spacing: 0px; color: #333333; outline-width: 0px; padding-bottom: 0px; padding-top: 6px; font: 13px/20px 'Segoe UI', Trebuchet, Arial, sans-serif; outline-style: none; padding-left: 0px; clear: both; margin: 0px 0px 12px; orphans: 2; widows: 2; letter-spacing: normal; outline-color: invert; padding-right: 0px; background-color: #ffffff; text-indent: 0px; border: #dbdbdb 0px solid;"><label style="font-size: 13px; font-family: inherit; vertical-align: baseline; font-weight: normal; outline-width: 0px; padding-bottom: 0.3em; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; display: block; outline-color: invert; padding-right: 0px; border: 0px;" for="Brano_PrezzoWave_Value">PrezzoWave</label><input id="Brano_PrezzoWave_Value" class="input-validation-error text-small" style="font-family: inherit; width: 4em; border: #bdbcbc 1px solid; padding: 3px;" name="Brano.PrezzoWave.Value" type="text" value="2,45" /> The value '2.45' is not valid for Value.</fieldset>

 

Honestly is a quite common problem with chrome: it's installed in english, and often there are problems with when operating system (en, without language pack) and international settings are in italian.

i suppose the problem is the missing Language pack, that i don't install: chrome have this problem often, ie not.

 

Sep 17, 2012 at 5:30 PM

I have the exact same problem with Orchard 1.5.1 and Chrome.  Works perfectly in IE10 and Firefox 15.
I have installed Chrome with language en-US and am running with site locale nl-BE.  The issue is that
neither comma nor decimal point are accepted as a valid decimal separator.

Coordinator
Sep 17, 2012 at 5:45 PM

Please vote for the bug if you haven't already, and add a comment there if you have additional information.