[whatwg] Suggested changes to Web Forms 2.0, 2004-07-01 working

Matthew Raymond mattraymond at earthlink.net
Fri Jul 9 09:56:23 PDT 2004

Michael wrote:
> <label for="...">Date: (format: dd-mm-yyyy)</label>
> <input type="date" id="..." format="dd-mm-yyyy">
> Now the WF2 UA provides a widget for that format instead of based upon
> a detected locale. The legacy user and WF2 user get a correct label
> and I only have to have the server convert the one format dd-mm-yyyy
> from legacy users.
> I didn't want to add yet another attribute but I think it helps solve
> this problem.

    Well, we're already using pattern for the other <input> types. Why 
not just use that for this situation too?

<input type="date" id="..." pattern="dd-mm-yyyy">

    Only problem I see is that it breaks convention with how pattern is 
used elsewhere (which uses ECMAScript). So a new "format" attribute may 
be necessary.

    I should point out that the |format| attribute should apply to both 
the entry format and the submission format. It should never apply to 
only visible format or only submission, and should only be used in 
circumstances where you're supporting both WF2-compliant and legacy user 
agents. In fact, I think this property should effectively be born 
depreciated, so that people will only use it when they have to.

More information about the whatwg mailing list