[whatwg] Input type=date UI discussion

Olav Junker Kjær olav at olav.dk
Tue Jul 12 12:45:12 PDT 2005


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.)


/Olav



More information about the whatwg mailing list