From 9e2bf65d6a5dc3b53db84f4839652f0d154349ee Mon Sep 17 00:00:00 2001 From: caleb logan Date: Tue, 29 Aug 2017 11:56:08 -0700 Subject: Fixed #28530 -- Prevented SelectDateWidget from localizing years in output. --- django/forms/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/forms') diff --git a/django/forms/widgets.py b/django/forms/widgets.py index f306abdec6..35904d3372 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -958,7 +958,7 @@ class SelectDateWidget(Widget): def get_context(self, name, value, attrs): context = super().get_context(name, value, attrs) date_context = {} - year_choices = [(i, i) for i in self.years] + year_choices = [(i, str(i)) for i in self.years] if not self.is_required: year_choices.insert(0, self.year_none_value) year_attrs = context['widget']['attrs'].copy() -- cgit v1.3