Opened 5 years ago
Last modified 12 days ago
#7665 assigned enhancement
Add jQuery UI's datepicker() where applicable
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | lowest | Milestone: | Future Release |
| Component: | Editor | Version: | 2.7 |
| Severity: | minor | Keywords: | has-patch needs-testing |
| Cc: | johnbillion@…, scribu, goldenapples, aaroncampbell, christophe@…, sirzooro, ciantic@…, ian_dunn@…, justin@…, eric.andrew.lewis@…, steph@… |
Description (last modified by aaroncampbell)
Obviously it'll need some skinning, but it's handy dandy:
http://jqueryui.com/demos/datepicker/
It'd be slick to have that for choosing dates (for example publish dates). We should still allow manual entry though.
Attachments (5)
Change History (43)
comment:2
caesarsgrunt — 5 years ago
+1. I'd really like a datepicker.
But themed; the example one on jquery.com is uuuglyyy...
comment:5
ydekproductions — 4 years ago
- Version changed from 2.7 to 2.8
Hey guys, I know this is a bit early, but I have a pretty good understanding of this, and I'd like to tackle this if nobody else is. :)
Got any ideas on how the skin should look?
- Component changed from Administration to JavaScript
- Milestone changed from Future Release to 2.9
- Owner changed from anonymous to azaozz
- Component changed from JavaScript to Editor
- Owner azaozz deleted
- Milestone changed from 2.9 to Future Release
punting this back pending patch
comment:11
johnbillion — 3 years ago
- Cc johnbillion@… added
comment:12
dahamsta — 2 years ago
+1 for a proper date picker, scheduling is incredibly awkward at the moment.
Please merge with 11942: #11942
comment:13
scribu — 2 years ago
- Cc scribu added
comment:14
goldenapples — 2 years ago
- Cc goldenapples added
comment:15
aaroncampbell — 2 years ago
- Cc aaroncampbell added
- Description modified (diff)
- Version changed from 2.8 to 2.7
Just updating the link in the description
comment:16
chsxf — 23 months ago
- Cc christophe@… added
comment:17
chsxf — 23 months ago
I'm working on a patch for this.
It should be available by the end of the week, maybe earlier.
comment:18
chsxf — 23 months ago
- Owner set to chsxf
- Status changed from new to assigned
comment:19
chsxf — 23 months ago
- Keywords has-patch needs-testing added; needs-patch removed
comment:20
follow-up:
↓ 21
scribu — 23 months ago
It would be nice if you could find a way to avoid using date_parse_from_format().
Also, commonL10n.datePicker_month01 etc. is really ugly. Related: #11520
comment:21
in reply to:
↑ 20
chsxf — 23 months ago
Replying to scribu:
It would be nice if you could find a way to avoid using date_parse_from_format().
Also, commonL10n.datePicker_month01 etc. is really ugly. Related: #11520
I can search a way to avoid using date_parse_from_format() but what is the problem with this function ? Does the problem come from my placeholder implementation of the function ?
Concerning the second point, I may use the official translations provided by jQuery for the date picker but I still need to provide at least translations for the time picker and the firstDay setting for the date picker. Is this OK if I leave those ones inside commonL10n or not ?
comment:22
chsxf — 23 months ago
New attachments include some modifications for the date picker translations by supporting official jQuery translations.
For the PHP side, I still use date_parse_from_format() as I don't find another way to handle dates correctly yet.
Note : replaced tar.gz attachment because a file was missing. Sorry for the typo in the file suffix but it is not possible for me to rename the attachment.
comment:23
scribu — 21 months ago
Closed #18659 as dup.
comment:24
sirzooro — 20 months ago
- Cc sirzooro added
comment:25
chsxf — 20 months ago
Latest attachment contains my patch synced against today's latest trunk (WP 3.3 development version - r18813)
comment:26
ciantic — 19 months ago
- Cc ciantic@… added
Is this patch missing something, or why this is not commited to trunk?
Patch seems awesome and not committing or giving advice how to improve it (so it gets commited) is just rude for the patch-maker. Wasting ones time on upgrading patch against trunk again and again!
Everybody needs this patch (or at least me!)
comment:27
scribu — 19 months ago
Is this patch missing something, or why this is not commited to trunk?
http://wpdevel.wordpress.com/version-3-3-project-schedule/
Everybody needs this patch (or at least me!)
lol
comment:28
WraithKenny — 18 months ago
related #18909
I've noticed with the current version of jQuery, and the current version of jQuery UI that the datepicker's events have issues (create, onChangeMonthYear, onSelect don't fire, beforeShowDay gives errors, onClose and beforeShow did work) At least with my tests.
Also, datepicker doesn't support "Theme CSS Scope" (for multiple themes per page).
comment:29
follow-up:
↓ 38
WraithKenny — 18 months ago
Please also consider an html5 input[type="date"] with feature detection to fail back onto jQuery UI. Opera is the only decent native datepicker though.
comment:30
follow-up:
↓ 31
iandunn — 18 months ago
- Cc ian_dunn@… added
+1 for this; I'd really like to be able to use datepicker() in plugins/themes. I don't see why the entire jQueryUI library wasn't added to core. Just because the WP core doesn't use it doesn't mean that plugins/themes won't, and it's counter-intuitive to have only parts of a library available. If you say that jQueryUI is bundled w/ WP then ALL of it should be bundled, not just certain parts.
I'm not suggesting that it be enqueued by default, of course, just that it should be available so that plugins/themes can enqueue it when needed.
Replying to iandunn:
I don't see why the entire jQueryUI library wasn't added to core.
It was, in WP 3.3.
comment:32
in reply to:
↑ 31
iandunn — 18 months ago
comment:33
in reply to:
↑ 31
WraithKenny — 18 months ago
comment:34
scribu — 18 months ago
If he did, there's a ticket for that already: #18909
comment:36
ericlewis — 7 months ago
- Cc eric.andrew.lewis@… added
comment:37
sillybean — 3 months ago
- Cc steph@… added
comment:38
in reply to:
↑ 29
thisislawatts — 12 days ago
Replying to WraithKenny:
Please also consider an html5 input[type="date"] with feature detection to fail back onto jQuery UI. Opera is the only decent native datepicker though.
This is also something shipping in Chrome since August 2012 and a quick 'looks at the iPhone' check, shows it is well implemented in iOS 5.x, so if this is added I think applying jQuery UI conditionally has to be the best way right?

Datepicker linked to dropdowns might be nice. We'd need to massage its i18n to use our gettext.