My locale dateformat is dd/mm/yyyy and Django is requering AAAA-MM-DD
when the user inputs 04/11/2009 Django raises:
_('Enter a valid date in YYYY-MM-DD format.'))
Im using simple html input field type=”text”, Not forms.DateField
Thanks 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m assuming you are using a
forms.DateField. If so, you need to supply ainput_formatsargument like so:input_formats just takes a list of the formats you want to accept.
See http://docs.djangoproject.com/en/dev/ref/forms/fields/#datefield for more information.