﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
4341	SelectDateWidget does not pass through attrs	Peter Reeves <oneofthemany1@…>	Alex Robbins	"Using the following code, the output html omits any attributes passed to it.


{{{
DataForm.base_fields['dob'].widget = extras.SelectDateWidget(years=range(2007,1899,-1),attrs={'class':'dobclass' })
}}}



Below is the output from diff for a patch to django\newforms\extras\widgets.py:

However this does not allow the setting of different attributes per select option.


{{{
43c43
<         select_html = Select(choices=month_choices).render(self.month_field % name, month_val)
---
>         select_html = Select(choices=month_choices).render(self.month_field % name, month_val, attrs=self.attrs)
47c47
<         select_html = Select(choices=day_choices).render(self.day_field % name, day_val)
---
>         select_html = Select(choices=day_choices).render(self.day_field % name, day_val, attrs=self.attrs)
51c51
<         select_html = Select(choices=year_choices).render(self.year_field % name, year_val)
---
>         select_html = Select(choices=year_choices).render(self.year_field % name, year_val, attrs=self.attrs)


}}}

"		closed	Forms	dev		worksforme	SelectDateWidget  attrs	oneofthemany1@…	Accepted	1	0	1	1	0	0
