为什么HTML5输入类型的日期时间从已经支持的浏览器中删除? [英] Why is HTML5 input type datetime removed from browsers already supporting it?

查看:235
本文介绍了为什么HTML5输入类型的日期时间从已经支持的浏览器中删除?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道为什么所有浏览器,如Chrome版本高于26,过去支持输入 datetime 删除它?



这听起来像一个这篇文章,但是那个相当老了。



看起来像HTML WG喜欢 datetime-local w3c datetime w3c ),但为什么?



请参阅

其他人说:



根据 mobilexweb.com 在iOS中已被弃用,因为它看起来像日期时间输入类型'。


以下Google Chrome,现在iOS版Safari支持
datetime输入类型,它将会回退到文本。这种类型
在标准中被弃用,有利于datetime-local或使用两个
输入,日期和时间用于相同的目的。问题是
datetime与iOS 5.0版兼容;如果你是
使用它,请小心!


有什么区别? p>

其中 datetime-local 仅包含日期和时间元素, datetime 还包含时区。这是有用的,因为您可能希望在客户端的时区与服务器的时区不同时采取不同的行动。



为什么这么重要? / p>


如果网页询问:你什么时候打电话给你,用户选择明天下午3点,什么时候需要打电话给他吗?明天下午3点UTC或CET?



解决方案

我可以想到的唯一原因是浏览器厂商丢失对标准的信任被批准,因此从他们的代码中删除实现。



为了支持这个想法:W3C刚刚删除了 datetime datetime-local 从他们的工作草案。



浏览器供应商最终会放弃对他们的支持。



根据 html5test 大多数当前的浏览器都删除了对这两种输入类型的支持。



最新开发:




  • datetime-local 正在草稿中;

  • 较新的规格页不t显示 datetime ,但它显示 datetime-local 。它听起来像是在地图上,并再次被支持!



还要注意这个相关的帖子在网站管理员。 SE:是否从HTML 5.1删除datetime-本地?


I was wondering why all browsers, like Chrome versions higher than 26, which had support in the past for the input datetime removed it?

This sounds like a duplicate of this article, but that one is quite aged.

It looks like the HTML WG prefers datetime-local (w3c) above datetime (w3c), but why?

See this for feature development timeline.

What others say:

According to mobilexweb.com it was deprecated in iOS 'because it looks too much like the datetime input type'.

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!

What is the difference?

Where datetime-local contains only a date and time element, datetime also contains the time zone. This is useful since you might want to act differently when the client's time zone is different from the server's one.

Why does this matter?

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?

解决方案

The only reason I can think of is browser vendors losing faith in the standard being approved, therefore removing the implementation from their code.

To support this thought: W3C just removed both datetime and datetime-local from their working draft.

Browser vendors will eventually drop support of both of them.

According to html5test most of the current browsers removed support of both of the input types.

The latest development:

  • The datetime-local is back on the draft;
  • The newer specs page doesn't show datetime, but it does show datetime-local. It does sound like it is back on the map and going to be supported again!

Also take notice of this related post on Webmasters.SE: Is datetime-local removed from HTML 5.1?.

这篇关于为什么HTML5输入类型的日期时间从已经支持的浏览器中删除?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆