summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/extras/widgets.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/django/forms/extras/widgets.py b/django/forms/extras/widgets.py
index 51455780f5..4fb4869e68 100644
--- a/django/forms/extras/widgets.py
+++ b/django/forms/extras/widgets.py
@@ -134,3 +134,8 @@ class SelectDateWidget(Widget):
s = Select(choices=choices)
select_html = s.render(field % name, val, local_attrs)
return select_html
+
+ def _has_changed(self, initial, data):
+ input_format = get_format('DATE_INPUT_FORMATS')[0]
+ data = datetime_safe.datetime.strptime(data, input_format).date()
+ return super(SelectDateWidget, self)._has_changed(initial, data) \ No newline at end of file