Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
296 views
in Technique[技术] by (71.8m points)

html - Why is HTML5 input type datetime removed from browsers already supporting it?

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?

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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?.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...