I've added the FloppyForms SplitDateTimeWidget to my datetime fields and if there is a value already stored the time is correctly set as expected in the forms, but the date just comes out as dd/mm/yyyy
.
What am I missing to get the form to correctly set the date value?
# forms.py
from django import forms
from generic.forms.widgets.floppyforms import SplitDateTimeWidget
from consoles.models import Event
class EventForm(forms.ModelForm):
class Meta:
model = Event
exclude = ('slug',)
widgets = {
'qualifying_date': SplitDateTimeWidget(date_format='%d/%m/%Y'),
}
The HTML generated has the correct value attribute, but the widget just shows 'dd/mm/yyyy'
<input type="date" name="start_0" value="21/08/2014" id="id_start_0">
<input type="time" name="start_1" value="10:00:00" id="id_start_1">