Opened 14 years ago
Closed 14 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 , 14 years ago
| Triage Stage: | Unreviewed → Design decision needed | 
|---|
comment:2 by , 14 years ago
| Resolution: | → duplicate | 
|---|---|
| Status: | new → closed | 
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.
    
I agree that
attrsshould 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 theattrscould 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.