[wp-trac] [WordPress Trac] #19813: Keyboard shortcuts for editing posted date

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 12 09:28:13 UTC 2012


#19813: Keyboard shortcuts for editing posted date
-------------------------+-----------------------------
 Reporter:  tw2113       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Date/Time    |    Version:  3.3.1
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 In short, I thought it would be a nice feature to be able to use the
 Up/Down arrow keys to increment or decrement the values within the post
 published date/time input boxes. I found this stackoverflow post with the
 basics of how to retrieve keystrokes and alter the value based on which
 one was pressed.

 http://stackoverflow.com/questions/7742364/incrementing-value-integer-in-
 an-input-type-field.

 I then altered the code to prevent negative numbers and stay within the
 limits of each field type.

 Days get 1-31
 Year gets 1900+
 Hours get 0-23
 Minutes get 0-59

 JS could probably be cleaned up a bit and condensed, but I wasn't quite
 sure how to separate them all out. Maybe someone with more js-fu can help
 out with that

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19813>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list