WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#4641 closed enhancement (duplicate)

jcalendar date selector for post timestamp

Reported by: tellyworth Owned by: westi
Milestone: Priority: normal
Severity: normal Version: 2.5
Component: Administration Keywords: jquery calendar
Focuses: 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)

jcalendar-r5798.patch (14.8 KB) - added by tellyworth 8 years ago.
jcalendar-r5798-a.patch (25.8 KB) - added by tellyworth 8 years ago.
jcalendar-r5798-b.patch (27.2 KB) - added by tellyworth 8 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 @Nazgul8 years ago

  • Milestone set to 2.4 (future)

comment:2 @ryan8 years ago

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

comment:3 @tellyworth8 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().

comment:4 @tellyworth8 years ago

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

comment:5 @ryan8 years ago

  • Milestone changed from 2.4 (future) to 2.3 (trunk)

comment:6 @ryan8 years ago

  • Keywords jquery calendar added

comment:7 @ryan8 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:8 follow-up: @matt8 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened
  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.

comment:9 in reply to: ↑ 8 @Nazgul8 years ago

Replying to matt:

  1. 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 @ryan8 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

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

comment:11 @dahamsta8 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 @westi8 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 @Viper007Bond7 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

Note: See TracTickets for help on using tickets.