W3C home > Mailing lists > Public > public-html@w3.org > June 2009

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

From: Simon Pieters <simonp@opera.com>
Date: Mon, 22 Jun 2009 08:10:33 +0200
To: "Michael A. Puls II" <shadow2531@gmail.com>, public-html@w3.org
Message-ID: <op.uvwwrvididj3kv@simon-pieterss-macbook.local>
On Fri, 19 Jun 2009 21:45:15 +0200, Michael A. Puls II  
<shadow2531@gmail.com> wrote:

>> 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?

Yeah, it could do that.


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

I didn't find anything explicitly in the section bout type=number, but  
generally the spec does not have any UI requirements.


> 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?

No, you have to use "." in the markup.

-- 
Simon Pieters
Opera Software
Received on Monday, 22 June 2009 06:11:12 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:04 UTC