Check if Browser Supports HTML5 timepicker

丶灬走出姿态 提交于 2019-11-30 22:24:33

I would argue that the safest bet is actually to assume that <input type="date"> is unsupported. As of today (early 2016), the actual UI for the date picker is still very inconsistent across browsers. Unless you're developing for a very concrete subset of browsers you are going to need some JavaScript anyway.

References:

Your best bet would be to assume that browsers that support a <input type="date"> have also implemented a time-picker for it.
(As far as I know, this is the case, what point would there be in supporting type="date", if it didn't have a reasonable way to input the date?)

This is because there's no way to check if the browser actually shows a timepicker. Aside from the modernizr checks, there's really nothing you can do.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!