- From: Ian Hickson <ian@hixie.ch>
- Date: Thu, 15 Jul 2004 14:04:00 +0000 (UTC)
On Fri, 9 Jul 2004, Michael wrote: > > I want to provide information for legacy UA users so they know what > format to enter. I could do: > > <label for="...">Date: (format: dd-mm-yyyy)</label> > > Great, until the WF2 UA recognizes a United States user and give a > locale-specific widget where the format is mm-dd-yyyy. Now my label is > wrong (and 06-12-2005 has a whole different meaning). Yeah, you would have to use JavaScript (or the initial value="" attribute) to provide users with format information. For example: http://whatwg.org/demos/date-01/ > In the meanwhile the server is expecting yyyy-mm-dd format so either I > need to tell only the legacy UA users to use yyyy-mm-dd format or need > to have the server guess as to the correct date when the format is > xx-xx-xxxx. One solution to this is to accept all (distinguishable) formats on the server-side, as is done in the demo mentioned above. > Now suppose the following: > > <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. The problem with this is that it assumes that the UA is going to be displaying a text entry field at all. In theory, the UA could just provide a calendar, so the format "dd-mm-yyyy" would be meaningless. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 15 July 2004 07:04:00 UTC