Page MenuHomePhabricator

Include a time picker widget module in core
Closed, DeclinedPublic

Description

For date picking there's the standard jQuery datepicker, but I couldn't find anything like this for picking time. Googling found a few jQuery add-ons, but AFAIU none of them is standard (I might be wrong).

The SemanticFormsInputs extension uses some time picker. This is also needed in CentralNotice (see Bug 36793) and may be needed elsewhere in the future.


Version: unspecified
Severity: enhancement

Details

Reference
bz36794

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:21 AM
bzimport set Reference to bz36794.
bzimport added a subscriber: Unknown Object (MLST).

ResourceLoader is all about modules. Extensions that need modules can include these modules (which can be either written from scratch, a derivative of an existing plugin, or a direct copy of an existing plugin directly).

I'd say find something that works for CentralNotice first, and use it now as a plugin in the extension. No need to add it to core first.

If other extension (e.g. SemanticFormsInputs) wants and can use the same,, we could consider including it in core.

Is the time picker in SemanticFormsInputs a stand-alone plugin that can be used directly? Does it fit the jQuery UI theme (e.g. use ui- classes)?

Per previous comment, unless it's used in core, it probably shouldn't be written in core. It may end up being shipped as part of core via a library like OOjs UI, however.

Once CentralNotice finds a widget that suits them, we can decide what to do about it, but I'll close this for now as in itself, adding a widget in core seems odd. If CentralNotice's page is converted to OOjs UI, then it could use the DateTime widget. Which is already provided in MediaWiki core and supports date, time and date-time.

It may end up being shipped as part of core via a library like OOjs UI, however.

That would be T91148.