jazzband / django-floppyforms

Full control of form rendering in the templates.
http://django-floppyforms.readthedocs.org/
Other
841 stars 148 forks source link

SplitDateTimeWidget gets a value but renders 'dd/mm/yyyy' #121

Closed marksweb closed 9 years ago

marksweb commented 10 years ago

I've implemented the SplitDateTimeWidget on a ModelForm;

class EventForm(forms.ModelForm):

    class Meta:
        model = Event
        exclude = ('slug',)
        widgets = {
            'start': SplitDateTimeWidget(date_format='%d/%m/%Y'),
            'qualifying_date': SplitDateTimeWidget(date_format='%d/%m/%Y'),
        }

The HTML that the fields render looks fine, but the widget shows 'dd/mm/yyyy' instead of the value;

<input type="date" name="start_0" value="21/08/2014" id="id_start_0">

If the fields render without the widget it behaves as expected, what am I missing?

gregmuellegger commented 9 years ago

Sorry that I get back to you sooo very late. Is this Problem still relevant to you? Did you solve it somehow for your case?

I don't see anything bad in the output you have provided, if you still want me to look into this, then feel free to reopen this ticket.

marksweb commented 9 years ago

I'm afraid I don't remember. We stopped using the app long ago.

gregmuellegger commented 9 years ago

Ok, thanks for getting back!