[whatwg] input type=date

Schalk Neethling sneethling at mozilla.com
Thu Jan 12 11:20:57 PST 2012


Ok, so reading some of the discussion, maybe being more precise with our html lang= would help or, is this not inherited down the chain so, when declaring input type=date, one needs to specify lang=en-US?

Will that have the desired effect as described earlier in the thread?

Schalk

----- Original Message -----
From: "Schalk Neethling" <sneethling at mozilla.com>
To: "Scott González" <scott.gonzalez at gmail.com>
Cc: whatwg at lists.whatwg.org
Sent: Thursday, January 12, 2012 9:15:19 PM
Subject: Re: [whatwg] input type=date

Hey Scott,

There will need to be a js, or server side function if js is not available, function that converts whatever you get to the format you require/expact. I was just curious what the default behavior would be for the input element and, whether there would be a way to indicate which format you wish returned.

Schalk

----- Original Message -----
From: "Scott González" <scott.gonzalez at gmail.com>
To: "Schalk Neethling" <sneethling at mozilla.com>
Cc: whatwg at lists.whatwg.org
Sent: Thursday, January 12, 2012 8:53:13 PM
Subject: Re: [whatwg] input type=date

I don't believe so. I also don't think there's any way to do the equivalent in JavaScript, e.g., asking for a Date object to generate a string representation in some other locale (aside from UTC).

>From personal experience, I've found that when users need to enter times for timezones other than their own, the chance of error is high.



2012/1/12 Schalk Neethling < sneethling at mozilla.com >


yep, that answers my question but, is there any work done to perhaps add an attribute where the author can specify the date format they require/want? 

Thanks, Scott



----- Original Message -----
From: "Scott González" < scott.gonzalez at gmail.com >
To: "Schalk Neethling" < sneethling at mozilla.com >
Cc: whatwg at lists.whatwg.org
Sent: Thursday, January 12, 2012 8:39:21 PM
Subject: Re: [whatwg] input type=date

I think the following note answers your question:

"Note: The format shown to the user is independent of the format used for form submission. Browsers are encouraged to use user interfaces that present dates according to the conventions of the user's preferred locale." - http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#date-state-(type=date)



On Thu, Jan 12, 2012 at 1:33 PM, Schalk Neethling < sneethling at mozilla.com > wrote:


Hey all,

Asked this on IRC and got no response so here goes:

Is there a way to specify the locale input type=daye should use or does it simply use the current locale? If so, does it choose the server locale or the user locale?

Kind Regards,
Schalk
Web Developer @ Mozilla





More information about the whatwg mailing list