Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #25006 -- Allowed custom time shortcuts in admin's time picker. #7799

Merged
merged 1 commit into from May 27, 2017

Conversation

desecho
Copy link
Contributor

@desecho desecho commented Jan 5, 2017

The list of hours can be overridden for each field in javascript like this:

DateTimeShortcuts.clockHours.name = [
    ['3 a.m.', 3]
]

where name is the name attribute of the input tag.

@desecho desecho force-pushed the ticket_25006 branch 2 times, most recently from 2caa048 to abe1775 Compare January 5, 2017 22:21
Copy link
Member

@timgraham timgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it feasible to add a test in js_tests/admin?

@@ -15,9 +15,18 @@
calendarLinkName: 'calendarlink',// name of the link that is used to toggle
clockDivName: 'clockbox', // name of clock <div> that gets toggled
clockLinkName: 'clocklink', // name of the link that is used to toggle
shortCutsClass: 'datetimeshortcuts', // class of the clock and cal shortcuts
shortcutsClass: 'datetimeshortcuts', // class of the clock and cal shortcuts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks unrelated to the patch.

@desecho
Copy link
Contributor Author

desecho commented Feb 24, 2017

I made the changes

@timgraham timgraham changed the title Refs #25006 -- Allow for custom Time shortcuts in DateTimeShortCuts.js. Fixed #25006 -- Allowed custom time shortcuts in admin's time picker. May 27, 2017
@timgraham timgraham merged commit 385cf70 into django:master May 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants