Ticket #4641 (new enhancement)

Opened 1 year ago

Last modified 8 months ago

jcalendar date selector for post timestamp

Reported by: tellyworth Assigned to: westi
Priority: normal Milestone: 2.9
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

jcalendar-r5798.patch (14.8 kB) - added by tellyworth on 07/15/07 11:31:02.
jcalendar-r5798-a.patch (25.8 kB) - added by tellyworth on 07/16/07 00:36:24.
jcalendar-r5798-b.patch (27.2 kB) - added by tellyworth on 07/16/07 06:14:20.

Change History

07/15/07 11:31:02 changed by tellyworth

  • attachment jcalendar-r5798.patch added.

07/15/07 16:35:09 changed by Nazgul

  • milestone set to 2.4 (future).

07/15/07 17:46:19 changed by ryan

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

07/16/07 00:36:24 changed by tellyworth

  • attachment jcalendar-r5798-a.patch added.

07/16/07 00:39:17 changed by tellyworth

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().

07/16/07 06:14:20 changed by tellyworth

  • attachment jcalendar-r5798-b.patch added.

07/16/07 06:15:01 changed by tellyworth

Whoops, I left wp-admin.css out of the patch by mistake. Fixed in jcalendar-r5798-b.patch.

07/16/07 19:21:51 changed by ryan

  • milestone changed from 2.4 (future) to 2.3 (trunk).

07/16/07 19:22:01 changed by ryan

  • keywords set to jquery calendar.

07/16/07 19:22:28 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [5804]) jquery data selector for post timestamps. Props tellyworth. fixes #4641

(follow-up: ↓ 9 ) 07/16/07 19:29:07 changed by matt

  • status changed from closed to reopened.
  • resolution deleted.
  1. When you click a date it doesn't check the "edit timestamp" box anymore.
  2. It barely fits in the column.
  3. 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.

(in reply to: ↑ 8 ) 07/16/07 20:03:02 changed by Nazgul

Replying to matt:

2. 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.

07/17/07 19:26:04 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [5808]) Revert jcalendar date picker experiment. Save it for another day. fixes #4641

01/15/08 15:17:26 changed by dahamsta

  • status changed from closed to reopened.
  • resolution deleted.

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!

01/15/08 15:27:23 changed by westi

  • owner changed from anonymous to westi.
  • status changed from reopened to new.
  • version set to 2.5.
  • milestone changed from 2.3 to 2.6.