[Fixed]-Django- jquery Datetime picker cannot save the form with date selected

1👍

You need to configure the form fields in your form class to accept your chosen date format:

start_date = forms.DateField(widget=DateInput(format='%Y%m'), input_formats=['%Y%m']) 
end_date = forms.DateField(widget=DateInput(format='%Y%m'), input_formats=['%Y%m'])

(This should work in both a regular Form and a ModelForm).

Leave a comment