W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2005

[whatwg] Input type=date UI discussion

From: Olav Junker Kjr <olav@olav.dk>
Date: Tue, 12 Jul 2005 21:45:12 +0200
Message-ID: <42D41DC8.3060800@olav.dk>
Dean Edwards wrote:
>> - Date widget appearance: Once the date chooser popup widget has been  
>> dismissed, the date in its correct localized format will be displayed 
> I agree but localisation is hard for us. I'm not sure how we are doing 
> that yet. Olav?

Thats the easy part. Using the built-in toLocaleDateString() method on 
the Date object, we get the date in unambiguous localized format (month 
names spelled out). The hard part is parsing free-form date input, since 
the localization is not reversible - the built-in parse method don't 
support parsing the localized format. Therefore we are probably going to 
support only numeric date input (like 7-8-2005), parsed based on 
localization settings. Since the user might be unsure what format to 
enter the date in, it's important with the date picker (so you can pick 
a date without typing), and with the unambigous localized feedback.

I agree that free-form input is quite nice, eg. if you have to enter 
your own birth date, its much faster to type than to pick.

>> - Should the left-most day of the week be Sunday or Monday? Is this a  
>> localization issue?

Yes it is. Should depend on the users locale.
(This might be a bit tricky to show if a calendar is used for picking a 
week, since ISO weeks always start monday.)

Received on Tuesday, 12 July 2005 12:45:12 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:41 UTC