Opened 7 years ago

Closed 7 years ago

#28864 closed New feature (duplicate)

Allow overriding the default dropdown list for the time widget in Django admin

Reported by: jeffrey k eliasen Owned by: nobody
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Right now all time widgets in the admin offer a dropdown list of times to enter, but the list is only 5 times: "now", "6 am", "noon", "6 pm", and "midnight". For most use cases this list is not practical.

I propose altering the javascript so that the user can either override a javascript function that builds the list or (better) alter the widget so that details about the start time, stop time, and minutes increment are provided as parameters on the TimeField or DateTimeField.

I will be creating a PR for this change in the next week or so.

Change History (2)

comment:1 by Tim Graham, 7 years ago

Duplicate of #25006?

comment:2 by jeffrey k eliasen, 7 years ago

Resolution: duplicate
Status: newclosed

Ah yes, so it is. Thanks for pointing that out @Tim.

Note: See TracTickets for help on using tickets.
Back to Top