SplitDateTimeWidget (or MultiWidget) doesn't allow different attrs for different fields
|Reported by:||Owned by:||nobody|
|Cc:||cmawebsite@…, kmike84@…, charette.s@…, james.kirsop@…||Triage Stage:||Accepted|
|Has patch:||yes||Needs documentation:||yes|
|Needs tests:||no||Patch needs improvement:||no|
Many times it is needed to have for instance different class attribute value for DateField than TimeField, therefore SplitDateTimeWidget should have a way to give different attrs for time and datefields.
There are two ways to fix the problem:
1.) add the possiblity to MultiWidget and let SplitDateTimeWidget merely use the ability or,
2.) add the possiblity to SplitDateTimeWidget
First method is semantically a bit more correct, but requires more than few seconds of implementation (Currently I'm out of time and I can't spare to implement patch for first approach).
Here is the patch for second approach (note that for the second approach leaving the multiwidget attrs as None was sufficient)
Change History (15)
comment:5 Changed 5 years ago by
|Triage Stage:||Design decision needed → Accepted|
comment:10 Changed 5 years ago by
|Patch needs improvement:||unset|