Opened 6 years ago
Last modified 3 years ago
#28354 assigned New feature
Add a "humanized" widget for DurationField
Reported by: | Nikita Levonovich | Owned by: | Artem |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Normal | Keywords: | Duration field. Forms. |
Cc: | Adam Johnson | Triage Stage: | Someday/Maybe |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | yes |
Description
Make a widget witch represents duration field as four NumberFields.
Change History (9)
comment:1 Changed 6 years ago by
Owner: | changed from nobody to Nikita Levonovich |
---|---|
Status: | new → assigned |
comment:2 Changed 6 years ago by
Owner: | Nikita Levonovich deleted |
---|---|
Status: | assigned → new |
comment:3 Changed 6 years ago by
Summary: | Human readable duration field. → Add a "humanized" widget for DurationField |
---|---|
Triage Stage: | Unreviewed → Someday/Maybe |
comment:4 Changed 5 years ago by
This should probably be 5 number fields, since the supported format is [DD] [HH:[MM:]]ss[.uuuuuu]?
comment:6 Changed 3 years ago by
Owner: | set to Artem |
---|---|
Status: | new → assigned |
Version: | 1.11 → master |
comment:7 Changed 3 years ago by
comment:8 Changed 3 years ago by
Hi Artem,
I'm currently working on a project which needed a Duration Field widget, so we built something similar subclassing the MultiFieldWidget with 4x NumberInputs. Ours was slightly different as we didn't have an input for days but did for milliseconds (converted into microseconds). See dropbox screenshot.
I'm not a django expert but I'd be interested to discuss your approach with you as I think its a valid features.
Rupert
comment:9 Changed 3 years ago by
Cc: | Adam Johnson added |
---|
I'm uncertain if this is something that must be shipped with Django. Perhaps seeing a proposal will help evaluate the idea.