mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #28530 -- Prevented SelectDateWidget from localizing years in output.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user