Opened 7 years ago
Last modified 5 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 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 7 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:3 by , 7 years ago
Summary: | Human readable duration field. → Add a "humanized" widget for DurationField |
---|---|
Triage Stage: | Unreviewed → Someday/Maybe |
comment:4 by , 6 years ago
This should probably be 5 number fields, since the supported format is [DD] [HH:[MM:]]ss[.uuuuuu]?
comment:6 by , 5 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
Version: | 1.11 → master |
comment:7 by , 5 years ago
comment:8 by , 5 years ago
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 by , 5 years ago
Cc: | added |
---|
I'm uncertain if this is something that must be shipped with Django. Perhaps seeing a proposal will help evaluate the idea.