[whatwg] [Web Forms 2.0] Last minute suggestion - The <format> element.

Matthew Raymond mattraymond at earthlink.net
Fri Jan 21 09:19:29 PST 2005

Ian Hickson wrote:
> On Thu, 20 Jan 2005, Matthew Raymond wrote:
>>I've been bugged for a while by the problem of formatting hints for date 
>>and time inputs. The current model requires that either the server 
>>determines the format for itself... [...]
>>   I think we should introduce to WF2 a new element called <format> that would
>>contain the formatting hint text. This element would be rendered in legacy
>>user agents as text, but in WF2 user agents, its contents would be used in a
>>far more intelligent manner. Take this example, for instance: [...]
> I'm reluctant to add new features at this late stage. Does this demo:
>    http://whatwg.org/demos/date-01/
> ...not handle the case well enough?

    Where should I start?...

1) It uses a page worth of Javascript to do the work of a single HTML tag.

2) It uses a fallback method of displaying formatting hints that forces 
webmasters to learn Javascript, even when they may have little or no use 
for it outside of the date/time formatting issue.

3) It requires that you add the ISO8601 date and time format to your 
server's date/time parsing, regardless of whether you actually want 
people to be able to submit data to the server in that format.

4) On legacy user agents with Javascript disabled or unavailable, it 
requires the user to delete the format hint when entering a new date.

5) On legacy systems, the user can still input ISO8601 dates and times 
and have them validate on the server, in spite of the fact that the 
dates and times aren't in the listed format. This may encourage some 
users to use random date/time formats that the server doesn't support.

6) It may increase the difficulty of training people to use certain web 
apps within a corporation, because you must train them to use a 
different date format on legacy and WF2 user agents.

7) If a company has a specific internal date/time format, and they want 
that format used on all company web apps, they have to configure every 
WF2 user agent in the company to use that date/time format, since the 
<input type="datetime"> control doesn't provide a method of setting the 
format the user must enter the date and time with.

    Number 3 is the worst part, in my opinion. You shouldn't have to add 
parsing on the server just to get a date/time control in WF2 clients, 
and you shouldn't have to add Javascript to get a simple format hint on 
legacy systems. This is overhead that the webmaster really shouldn't 
have to deal with.

    Note: Modified version of the demo attached.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20050121/ecbf78be/attachment-0001.html>

More information about the whatwg mailing list