Opened 6 years ago
Closed 5 years ago
#4641 closed enhancement (duplicate)
jcalendar date selector for post timestamp
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | 2.5 |
| Severity: | normal | Keywords: | jquery calendar |
| Cc: |
Description
The enclosed patch adds a nice jquery-based calendar selector control to the Post Timestamp box. It's based on Ted Serbinski's jCalendar, with minor modifications to avoid clashes with prototype:
http://tedserbinski.com/jcalendar/index.html
Some further work is required (notably localization), but I thought I'd post it here for feedback before I spend more time on it.
Notes:
I chose jcalendar rather than Kelvin Luck's datePicker because datePicker only appears when you click on an icon. jcalendar gives a visual calendar view of the date at a glance.
The new input_dropdown() function in wp-admin/includes/template.php might be useful for other things. Perhaps it belongs elsewhere.
Attachments (3)
Change History (16)
tellyworth — 6 years ago
tellyworth — 6 years ago
comment:3
tellyworth — 6 years ago
See the revised patch. It adds l10n support, and fixes a naming inconsistency in the original.
I had to jump through hoops to pass in the localized month and day name arrays. Wound up writing a trivial json-like function to do the job - see WP_Scripts::js_encode_array().
tellyworth — 6 years ago
comment:4
tellyworth — 6 years ago
Whoops, I left wp-admin.css out of the patch by mistake. Fixed in jcalendar-r5798-b.patch.
- Resolution set to fixed
- Status changed from new to closed
- Resolution fixed deleted
- Status changed from closed to reopened
- When you click a date it doesn't check the "edit timestamp" box anymore.
- It barely fits in the column.
- I don't think enough consideration was given to "is this really worth it?" As someone who uses the date selector every day, I don't feel like it really improves the experience.
Replying to matt:
- It barely fits in the column.
Not even barely. Fri and Sat don't fit in the boxes on my screen.
I like the idea of a nice datepicker, but not in it's current form.
comment:10
ryan — 6 years ago
- Resolution set to fixed
- Status changed from reopened to closed
comment:11
dahamsta — 5 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Is another day here yet? :)
I do a lot of timed postings and because of the Post Timestamp tabindex problem, settings dates without flipping back and forth to the mouse is a pain in the arse. A date picker would cure this, and of course be incredibly handy!
comment:12
westi — 5 years ago
- Milestone changed from 2.3 to 2.6
- Owner changed from anonymous to westi
- Status changed from reopened to new
- Version set to 2.5
comment:13
Viper007Bond — 5 years ago
- Milestone 2.9 deleted
- Resolution set to duplicate
- Status changed from new to closed
While the idea is great, this ticket is rather old and a lot better solutions have come along meanwhile, such as jQuery UI's datepicker() function.
See: #7665

Cool. Add some WP_Scripts::localize() action and we're good.