Can the behaviour of new HTML5 form types be overridden?
Posted
by Mark Perkins
on Stack Overflow
See other posts from Stack Overflow
or by Mark Perkins
Published on 2009-11-12T14:19:24Z
Indexed on
2010/04/12
14:03 UTC
Read the original article
Hit count: 391
I was wondering if anyone knew if it were possible to override the default behaviour of browsers that support the new HTML input types such as type="email" and type="date"?
I appreciate that I could test if a browser supports an input type and provide a fallback for those browsers that don't, but what I want to know is is there any way to prevent that default behaviour from happening in browsers that do support it?
For instance, if in Opera I want to use the date input type, but I don't want Opera to display the native datepicker (i.e. I want to replace it with my own custom one) is that possible? Are there any DOM events triggered like onDatePickerShow that one can hook into?
I don't believe that this is possible, but if anyone knows for sure one way or the other I would love to hear from you.
© Stack Overflow or respective owner