diff --git a/django/forms/extras/widgets.py b/django/forms/extras/widgets.py index 7d05942f43..8f13ed6c62 100644 --- a/django/forms/extras/widgets.py +++ b/django/forms/extras/widgets.py @@ -77,7 +77,7 @@ class SelectDateWidget(Widget): escaped = True elif char in 'Yy': output.append(year_html) - elif char in 'bFMmNn': + elif char in 'bEFMmNn': output.append(month_html) elif char in 'dj': output.append(day_html) diff --git a/tests/regressiontests/i18n/tests.py b/tests/regressiontests/i18n/tests.py index 5823408bce..0a6f621e3c 100644 --- a/tests/regressiontests/i18n/tests.py +++ b/tests/regressiontests/i18n/tests.py @@ -341,6 +341,14 @@ class FormattingTests(TestCase): finally: deactivate() + # Russian locale (with E as month) + activate('ru') + self.assertEqual( + u'\n\n', + SelectDateWidget(years=range(2009, 2019)).render('mydate', datetime.date(2009, 12, 31)) + ) + deactivate() + # English locale settings.USE_L10N = True