This is a follow up to #501428: Date and time field type in core to add a jQuery timepicker to the core date field as a fallback for browsers that don't support the HTML5 time element.

Postponed until the date field makes it in.

Comments

sun’s picture

I guess you had a concrete differentiation in mind when filing this issue, but can you clarify why this is not a duplicate of #1835016: Polyfill date input type?

KarenS’s picture

That issue is for adding the jquery datepicker for the date element. That is already in core, so we don't need to choose and add a datepicker, we just need to decide how to use it as a fallback when the HTML5 date element doesn't work.

This issue is about a timepicker for the time element. There is no timepicker in core, so we need both to decide what/whether to add a jquery timepicker to core, and if so, which one. And then we have the same issue about how to use it only as a fallback when the HTML5 timepicker doesn't work.

KarenS’s picture

Title:Add a jquery timepicker to date fields» Add a jquery timepicker to the date field time element

Maybe this title is better.

sun’s picture

Title:Add a jquery timepicker to the date field time element» Add jQuery Timepicker for the Time element of the datetime field
Component:javascript» datetime.module
Status:Postponed» Active
Issue tags:+JavaScript, +html5, +polyfill
mgifford’s picture

tagging

klonos’s picture

vijaycs85’s picture

looks like we are using http://keith-wood.name/timeEntry.html in D7 for time picker and it is very close to HTML 5 time picker (Except the arrows in right). Are we OK to add it to core for time?

mpdonadio’s picture

Version:8.0.x-dev» 8.1.x-dev
Status:Active» Needs review
StatusFileSize
new110.01 KB

First pass using http://keith-wood.name/timeentry.html Seems to work in FireFox.

Not sure if/how to write tests for this. Also not sure sure how to handle the localization here.

mpdonadio’s picture

mgifford’s picture

Should I just be able to install this with SimplyTest.me?

mpdonadio’s picture

#10, that should work, but I haven't tried it. I think for the test, we could just render out a page w/ a datetime field on it or a timestamp entry (eg, the node form) and then check for the CSS and JS files.

droplet’s picture

Thanks for the patch.

If you testing in http://keith-wood.name/timeentry.html, don't you think it's UX problem ? I feel that hard to use.

mpdonadio’s picture

#12, that library was used b/c it is what is currently in the D7 Date Popup module. I agree that the UX isn't the best, however, it seemed like the least bad solution of the plugins I surveyed. Unfortunately, jQuery UI doesn't have an official option yet. I'm open to other options here.