这听起来像是重复的this article,但那一个是相当老。
看起来HTML工作站优先于datetime(w3c)的datetime-local(w3c),但是为什么?
特性开发时间线见this。
别人说什么:
根据mobilexweb.com它被弃用在iOS’,因为它看起来太像日期时间输入类型’。
Following Google Chrome,Now Safari on iOS doesn’t support the
datetime input type anymore and it will fallback to text. This type
was deprecated in the standard in favor of datetime-local or using two
inputs,date and time for the same purpose. The problem is that
datetime was compatible with iOS from version 5.0 to 6.1; if you are
using it,be careful!
有什么不同?
其中datetime-local仅包含日期和时间元素,datetime还包含时区。这是有用的,因为当客户端的时区与服务器的时区不同时,您可能需要采取不同的行动。
为什么这么重要?
What if the web page asks: when do you want me to call you,and the user selects ‘tomorrow,3pm’,when do you need to call him back? tomorrow 3pm UTC or CET?
解决方法
为了支持这个想法:W3C刚刚从他们的工作草案中删除了datetime和datetime-local。
浏览器供应商最终会放弃对它们的支持。
根据html5test,大多数当前浏览器删除了两种输入类型的支持。
最新发展:
> datetime-local返回草稿;
>更新的规格页面不显示日期时间,但它显示datetime-local
.它听起来像是回到地图上,并得到支持!
还注意这个相关的帖子Webmasters.SE:Is datetime-local removed from HTML 5.1?。