Fixed #25124 -- Eased customization of SelectDateWidget subwidget.

This commit is contained in:
George Brocklehurst 2015-07-14 22:57:23 -04:00 committed by Tim Graham
parent 59c3a140eb
commit 48af591b2d
1 changed files with 2 additions and 1 deletions

View File

@ -935,6 +935,7 @@ class SelectDateWidget(Widget):
month_field = '%s_month' month_field = '%s_month'
day_field = '%s_day' day_field = '%s_day'
year_field = '%s_year' year_field = '%s_year'
select_widget = Select
date_re = re.compile(r'(\d{4})-(\d\d?)-(\d\d?)$') date_re = re.compile(r'(\d{4})-(\d\d?)-(\d\d?)$')
@ -1050,6 +1051,6 @@ class SelectDateWidget(Widget):
if not self.is_required: if not self.is_required:
choices.insert(0, none_value) choices.insert(0, none_value)
local_attrs = self.build_attrs(id=field % id_) local_attrs = self.build_attrs(id=field % id_)
s = Select(choices=choices) s = self.select_widget(choices=choices)
select_html = s.render(field % name, val, local_attrs) select_html = s.render(field % name, val, local_attrs)
return select_html return select_html