Change wagtailforms SelectDateForm to use DateTimeFields

This is because DateFields are not timezone aware which causes warnings to be raised by django.

The widgets are still set to "DateInput" so the look and behaviour should not change
This commit is contained in:
Karl Hobley 2014-06-03 11:15:12 +01:00
parent 2b4b19a641
commit 1683287ee7

View file

@ -100,11 +100,11 @@ class FormBuilder(object):
class SelectDateForm(django.forms.Form):
date_from = django.forms.DateField(
date_from = django.forms.DateTimeField(
required=False,
widget=django.forms.DateInput(attrs={'placeholder': 'Date from'})
)
date_to = django.forms.DateField(
date_to = django.forms.DateTimeField(
required=False,
widget=django.forms.DateInput(attrs={'placeholder': 'Date to'})
)