Opened 12 years ago
Closed 10 years ago
#19813 closed enhancement (wontfix)
Keyboard shortcuts for editing posted date
Reported by: | tw2113 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.3.1 |
Component: | Date/Time | Keywords: | |
Focuses: | Cc: |
Description
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
template.php & utils.js edits