Re: parsing floating point values - user input for <input type="number"> in different locales

On Thu, 18 Jun 2009 21:57:01 -0400, Simon Pieters <simonp@opera.com> wrote:

> On Fri, 19 Jun 2009 00:17:05 +0200, Michael A. Puls II  
> <shadow2531@gmail.com> wrote:
>
>> In  
>> <http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#rules-for-parsing-floating-point-number-values>  
>> (used for <input type="number"> for example), the steps don't seem to  
>> account for user input of a decimal in the field where "," is used  
>> instead of "." depending on the locale.
>>
>> Is this covered anywhere or is it intended to only accept "."  
>> regardless of locale?
>
> The browser can use locale-specific conventions in the user interface.

Thanks.

So, if the user locale uses "," and the users enters "1,5" in the field,  
the UA would treat that as 1.5 hehind the scenes?

Is there anything in the spec that says this or is this just supposed to  
be obviously implied?

What about markup?

Will <input type="number" min="0,5" max="2,5" value="1,1" step="0,1"> work  
if the locale is correct? Will it then display a "," instead of a "." in  
the field when they click the little arrows to step up or step down?

Just want to be sure this is all covered.

-- 
Michael

Received on Friday, 19 June 2009 19:45:56 UTC