Closed Bug 1283388 Opened 8 years ago Closed 3 years ago

Implement UI for <input type="datetime-local">

Categories

(Core :: Layout: Form Controls, enhancement, P3)

53 Branch
enhancement

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: scottwu, Assigned: striptm, Mentored)

References

(Blocks 2 open bugs)

Details

(Keywords: dev-doc-complete)

Attachments

(5 files, 1 obsolete file)

      No description provided.
Component: XUL Widgets → Layout: Form Controls
Product: Toolkit → Core
Version: unspecified → 53 Branch
Priority: -- → P3
Type: defect → enhancement

In order to do this, we need to tweak this condition so that you create the widget, then you need to change this code to handle datetime-local in the picker, by maybe combining the two or what not.

If someone is interested on taking this I'm happy to mentor and help with debugging and so on.

Mentor: emilio
Assignee: nobody → striptm
Status: NEW → ASSIGNED
Attachment #9194869 - Attachment is obsolete: true

My proposal now would be to refactor toolkit/content/widgets/datetimebox.js
removing the classes DateInputImplWidget and TimeInputImplWidget and add logic to render date/time/datetime-local in DateTimeLocalInputImplWidget

Attachment #9194869 - Attachment is obsolete: false

Depends on D105959

Depends on D110979

Hi fer, sorry for the lag getting to this. This looks great, though some things:

  • The picker looks broken at least on Linux.
  • Your changes seem to cause toolkit/content/tests/browser/browser_datetime_datepicker.js to fail one of the tests. You can run this with ./mach mochitest toolkit/content/tests/browser/browser_datetime_datepicker.js.

This looks on the good track anyways. I've opened bug 1705946 to start landing your changes, and I'll try to look into the test failure and land the datetimebox.js refactoring next (though if you can dig into the test failure that'd be great as well of course).

Needs tests. This only shows the date picker for now (matches Safari).

Seems fine since we don't enable the time picker by default.

Attachment #9213877 - Attachment is obsolete: true
Attachment #9217733 - Attachment description: WIP: Bug 1283388 - Implement datetime-local UI. → Bug 1283388 - Implement datetime-local UI. r=Gijs
Attachment #9217733 - Attachment description: Bug 1283388 - Implement datetime-local UI. r=Gijs → WIP: Bug 1283388 - Implement datetime-local UI. r=Gijs
Attachment #9217733 - Attachment description: WIP: Bug 1283388 - Implement datetime-local UI. r=Gijs → Bug 1283388 - Implement datetime-local UI. r=Gijs
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8aef29efdec2
Implement datetime-local UI. r=Gijs
Backout by abutkovits@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6f71100cb98a
Backed out changeset 8aef29efdec2 for causing failures in test_MozEditableElement_setUserInput.html. CLOSED TREE
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6e763489ab1e
Implement datetime-local UI. r=Gijs
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/cb39252d466b
Remove a bit from a reftest which doesn't apply to date/time/datetime-local inputs.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch

Can this bug be reopened?

The current implementation as tested from Nightly (93.0a1) only permits picking a date, leaving the time as "--:--:--" and

This is not compliant with the specification:

A partial implementation confuses attempts to polyfill a functioning datetime picker.

Flags: needinfo?(emilio)

(In reply to TWC (Alt Email) from comment #17)

The current implementation as tested from Nightly (93.0a1) only permits picking a date, leaving the time as "--:--:--"

That matches Safari (and we don't ship a time picker for <input type=time> so it is consistent with that too).

This is not compliant with the specification:

Why? Neither of those links is a specification. The specification is this and it doesn't specify how the UI should look like, afaict.

Can this bug be reopened?

I filed bug 1726108 for this. Reopening this fixed bug would make tracking a mess.

Flags: needinfo?(emilio)
Regressed by: 1726546
No longer regressed by: 1726546
Regressions: 1726546
No longer blocks: 1761296
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: