Closed Bug 1306217 Opened 9 years ago Closed 4 years ago

Implement the layout for <input type=datetime-local>

Categories

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

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1283388
Webcompat Priority ?
Tracking Status
firefox52 --- affected

People

(Reporter: jessica, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: feature)

No description provided.
Priority: -- → P3
See Also: → 888331
Can someone please update the status of datetime-local? Is there a plan to work on this feature in the near future?
See bug 888320 comment 47 for the status. Sebastian
Type: defect → enhancement

Another URL : https://developer.mozilla.org/fr/docs/Web/HTML/Element/Input/datetime-local

Strangely, https://developer.mozilla.org/fr/docs/Web/HTML/Element/input/date and https://developer.mozilla.org/fr/docs/Web/HTML/Element/input/time are already implemented.

The support of datetime-local could be such a relief for many people. I want to see if I can contribute on this. Is there a guide on how to contribute ?

(In reply to vincent.enjalbert from comment #5)

Another URL : https://developer.mozilla.org/fr/docs/Web/HTML/Element/Input/datetime-local

Strangely, https://developer.mozilla.org/fr/docs/Web/HTML/Element/input/date and https://developer.mozilla.org/fr/docs/Web/HTML/Element/input/time are already implemented.

The support of datetime-local could be such a relief for many people. I want to see if I can contribute on this. Is there a guide on how to contribute ?

Hi, thank you for the interest in contribution.
For general information, https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide could be a good start for you.
For this specific bug, you would need to refer to this bug https://bugzilla.mozilla.org/show_bug.cgi?id=1069609 to follow the UX spec. I am not sure how easy this bug is for a new contributor, but I believe Emilio can share more thoughts. :)

Flags: needinfo?(emilio)

It's probably not too hard to come up with something that we can put behind a pref and works. We can then iterate on it as needed.

The main code for the widget and such is in datetimebox.js. There you also need to handle the datetime-local type.

There are a couple checks in HTMLInputElement.cpp like this which also need to account for DATETIME_LOCAL. I recommend creating a helper like InputTypeUsesUAWidget for this, and replace the current checks checking mType directly.

You should also change this line to create the same kind of frame (layout box) as we have for time and date inputs (so, replacing NS_NewTextControlFrame by NS_NewDateTimeControlFrame. I think that should mostly work out of the box

That should get you most of the way there. Then you'd need to implement the functionality of the input in datetimebox.js and the styling in datetimebox.css.

Not sure if you'll hit any issue with those steps (I hope not!), but if you do I'm happy to help, just needinfo? me or send a patch for review and I can provide feedback in Phabricator.

Thank you!

Flags: needinfo?(emilio)

Thank you both !
I can't promise anything for now, I have to check all of this first :) Will do asap.

Sorry guys, something came up here, and I have no free time anymore.
I still keep this in mind though, but atm I can't tell when I will have time again :(
I'll keep this thread updated if any news.

Is there any news on implementing this? Firefox (desktop) is currently the only browser that doesn't support this :(

Yeah, Even Safari has now started to support this from TP 117. Firefox is the only major browser that doesn't support it :(

(In reply to lafeber from comment #10)

Is there any news on implementing this? Firefox (desktop) is currently the only browser that doesn't support this :(

The most recent development seems to be here: https://bugzilla.mozilla.org/show_bug.cgi?id=1283388

Yeah, there's a patch in bug 1283388 which works but basically needs tests. I'm busy with other stuff atm, so if someone wants to help out that'd be awesome :)

Emilio, after fixing bug 1283388, is there anything left for this bug? Or can this one be closed in favor of the other one?

Sebastian

Flags: needinfo?(emilio)

I don't think so.

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(emilio)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.