117

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?

Community
  • 1
  • 1
Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325
  • 7
    HTML5 is still a "candidate recommendation". It's not final yet. That's probably why things keep changing. – gen_Eric Jan 21 '14 at 16:25
  • True, but as far as I can see the recommendation has not changed, so this seems to be a browser vendor's choice. – Patrick Hofman Jan 21 '14 at 17:47
  • I guess you'll have to find an external library or make it yourself... – LatinSuD Jun 04 '14 at 10:28
  • 2
    There's some useful information at [Webmasters.SE - Is datetime-local removed from HTML 5.1?](http://webmasters.stackexchange.com/questions/59284/is-datetime-local-removed-from-html-5-1) on the future of `date`, `time`, `datetime`, and `datetime-local`. – user247702 Aug 29 '14 at 09:24

2 Answers2

71

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

Community
  • 1
  • 1
Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325
  • 6
    Who defines standard if not they(developers of IE.Chrome, Firefox), why they delete perfectly fine things from browser? – Yoda Sep 10 '14 at 15:09
  • 4
    I couldn't agree more. It worked. It worked well. I need it. Why remove it? – Patrick Hofman Sep 10 '14 at 15:10
  • @Yoda: It seems that `datetime-local` at least is back on the roadmap. – Patrick Hofman Dec 15 '14 at 10:39
  • 2
    Yes, the sad thing is that we begin to see discrepancies between the two working groups, W3C ([W3C version of input](http://www.w3.org/TR/html5/forms.html#the-input-element)) and WHATWG ([WHATWG version of input](https://developers.whatwg.org/the-input-element.html#the-input-element)). I feared this would happen some day... – Diego Jan 12 '15 at 14:56
  • 4
    I love how this problem is still not solved over 25 years after the web was created. Pretty much sums up the software industry as a whole IMO. – Matt Lacey Oct 07 '17 at 22:04
  • Firefox is still not supporting `datetime-local`! Why should I use a feature which only works on Chrome?! – Ghasem Feb 19 '20 at 13:44
9

Source http://www.w3.org/TR/html5/

"The following features are at risk and may be removed due to lack of implementation.
..<input type=datetime>.."

Zach Saucier
  • 24,871
  • 12
  • 85
  • 147
Daniel
  • 379
  • 2
  • 6