Skip to content

Conversation

@micgro42
Copy link
Contributor

@micgro42 micgro42 commented Jan 26, 2018

Currently, the datetime type is broken in virtually every single browser in one way or another. Also, the jQuery date picker is broken in browsers which do not support the input type date. This has been caused by #363.

This pull request resolves these multiple issues.

let's test it before merging:

  • tested in IE 11
  • tested in Edge
  • tested in Chrome
  • tested in Firefox
  • tested in Safari
  • tested in iOS Safari

This fixes #373

As defined by the jquery ui datepicker documentation, "yy" referes
to the four digit year.
The datetime picker expects and produces dates / time pairs separated by
the "T" character, not a space. Further, it does not handle seconds at
all.

Therefore, we have to provide the timestamp in the input field separated
by a "T" and for consistency drop seconds altogether. Hence, it
becomes necessary to replace the "T" by a space again before providing it to jQuery
date picker fallback.

Further, we have to actually parse the "T" when validating the
timestamps we receive from the user.
input type datetime-local does not support seconds and therefore neither
does this type anymore.
@micgro42 micgro42 requested a review from splitbrain January 26, 2018 13:16
@micgro42 micgro42 merged commit 6bb2ce6 into master Mar 27, 2018
@micgro42 micgro42 deleted the fixDateTime branch March 27, 2018 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Time values are not saved in chrome browser

2 participants