[whatwg] Various forms-related comments

Ian Hickson ian at hixie.ch
Tue Aug 3 14:00:42 PDT 2010

On Thu, 6 May 2010, Schalk Neethling wrote:
> I absolutely love the fact that browsers will have certain validation 
> baked in like email addresses etc. With that, is there currently a way 
> to, or plans to add a way, where the way the browser displays these 
> errors can be styled with CSS?

To a limited extent you can use :invalid and company, but since browsers 
are still experimenting with how to expose the error messages, there's no 
standard way to style them yet. Maybe in time, if it makes sense.

On Thu, 6 May 2010, Schalk Neethling wrote:
> Are there any talks at the moment whether the type=date input will allow 
> a user to enter a date manually or use the date picker or, should 
> developers fall back to using a standard input field and add the date 
> picker via JavaScript?

I don't really understand the question.

On Thu, 6 May 2010, Tab Atkins Jr. wrote:
> The purpose of <input type=date> is to allow the browser to supply the 
> user with a datepicker.
> If you would like to show a datepicker to users of all browsers, use 
> feature detection (such as through the Modernizr script) to detect 
> whether or not the browser support date inputs, and if not, supply the 
> js version.


On Fri, 7 May 2010, Schalk Neethling wrote:
> Just to rectify any misunderstanding, I love the date picker that Opera 
> provides and others will hopefully do in turn but, my question is that 
> currently using type=date only provides the option of selecting a date 
> using the date picker. In a recent talk I gave on HTML 5 the question 
> arose that well, what if the user wants to have both options on the same 
> field?
> My suggestion was to fall back to using a standard text input field and 
> use JavaScript to add the date picker which will allow the user to enter 
> the date manually if so desired. Are there any current plans to add this 
> ability to type=date or is the fallback the best option?

On the long term, the theory is that you'll be able to use XBL to override 
the rendering and behaviour of these controls, but that's still some way 
in the future.

On Fri, 7 May 2010, Schalk Neethling wrote:
> Hey TJ, I understand what type=date is supposed to offer the user and 
> agree that using Modernizr to detect whether the element is supported 
> and provide a fallback but my more direct question is, would HTML 5 
> offer the ability to allow a user to use either the date picker or enter 
> the date manually if the type=date attribute is specified. Something 
> like for example <input type=date editable=true />

On Fri, 7 May 2010, Tab Atkins Jr. wrote:
> HTML5 doesn't specify anything about how the date input is presented. 
> It's entirely up to the browser to decide if they want to allow the user 
> to type a date in, or just use a datepicker, or what.


Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list