Opened 13 years ago

Closed 13 years ago

#16754 closed Bug (duplicate)

forms.extras.widgets.SelectDateWidget.render ignores 'attr' parameter

Reported by: Mikhail Korobov Owned by: nobody
Component: Forms Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

It should be passed to create_select method and used for html generation.

Found this issue while debugging this: https://bitbucket.org/kmike/django-widget-tweaks/issue/2/doesnt-work-for-selectdatewidget

Change History (2)

comment:1 by Julien Phalip, 13 years ago

Triage Stage: UnreviewedDesign decision needed

I agree that attrs should be used. However, those attributes are supposed to be applied to the widget as a whole rather than to its sub-select inputs. To me the proper way would be to wrap the sub-select inputs with a single piece of markup (e.g. <DIV>), and then the attrs could be applied to that. Although ideally this needs to be done in a way that doesn't break existing code and styles, so I'm marking as DDN until a proper working solution is proposed.

comment:2 by Jacob, 13 years ago

Resolution: duplicate
Status: newclosed

I think the best approach is the one proposed in #5851 - allow target each sub-widget directly. Marking as a duplicate of that one.

Thanks!

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