4 ms·
They are good for mobile and fairly useless on desktop browsers.
by smackfu 13y ago
They are good for mobile and fairly useless on desktop browsers.
- ht_th 13y agoWhy? Using them doesn't hurt as they fallback to the text input type. But semantically the code makes more sense as it is more specific, and for those browsers that don't support them, you could fall back on using some javascript to get similar functionality, if you're so inclined. Of course, these elements will look differently on different platforms/browsers, but for a lot of applications that doesn't matter. Maybe, in the next version/iteration of HTML they make these things a bit more style-able?
- smackfu 13y agoThe argument is that support on desktop is so spotty that you are going to have to implement it in JS/HTML anyways. A bare text input field is not sufficient for something like a date or color picker, and is it really better semantically if you have to hide the field entirely if the input sub-type isn't supported? Then if you are going to implement a custom version, it's easier to just use that on all browsers, since you can style it properly, and you don't have the risk of it changing under you as browsers add support in random version updates.
- lucian1900 13y agoThey're great on desktop browsers that support them: I get the same widget everywhere, instead of having to deal with stupidly different ones.
- papsosouid 13y agoYou mean "most desktop browsers are fairly useless". Go complain and get them to fix it. Html5 inputs are very old, there is no excuse for "modern" browsers not to support them. It is much better for users if they get the same, consistent date picking widget everywhere, rather than a different, partially working maybe sometimes javascript version on every site.