W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2012

[whatwg] input type=date

From: Schalk Neethling <sneethling@mozilla.com>
Date: Thu, 12 Jan 2012 11:15:19 -0800 (PST)
Message-ID: <b35a9dca-15d0-4c39-9149-fc5066f50fa6@sneethling-05169.local>
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. 


----- Original Message -----
From: "Scott Gonz?lez" <scott.gonzalez@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@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, 
Web Developer @ Mozilla 
Received on Thursday, 12 January 2012 11:15:19 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:39 UTC