Opened 3 years ago

Closed 3 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: master
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 Changed 3 years ago by Tim Graham

Duplicate of #25006?

comment:2 Changed 3 years ago by jeffrey k eliasen

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