[whatwg] <input type=number> for year input
TAMURA, Kent
tkent at google.com
Tue Mar 11 01:43:01 PDT 2014
On Thu, Feb 20, 2014 at 9:19 PM, Jonathan Watt <jwatt at jwatt.org> wrote:
> For what it's worth I just tried the following in Chrome, and if I type in
> "12,34" then increment using the spinner it resets to zero, seeming to
> indicate that the "," was rejected. Is that expected?
> data:text/html,<input type=number step=0.01 lang=fr>
It's expected. Form controls in Google Chrome doesn't respect lang
attribute for now. Form controls are always localized for browser's UI
locale.
>> We accepted entering grouping separators in the past. But we stopped it
>> because
>> users had to know their locale correctly. e.g. "1,234" has different
>> meaning in
>> French locale and English locale if we support grouping separators.
> So essentially you assume any separator that is a decimal separator in any
> locale is a decimal separator all cases? Even that approach would seem to
> have the potential for unexpected results for users; for example, a user
> types in "1,234" meaning 1234 but the input takes the value 1.234. Or
> maybe
> I misunderstand?
You're right. Such confusion can happen even in WebKit/Blink
implementation. However, it's much better than accepting both of grouping
separator and decimal separator IMO.
--
TAMURA, Kent
Software Engineer, Google
More information about the whatwg
mailing list