describes how to override the default fields created by a ModelForm. So I think you want to override the field in your ModelForm and specify a different list of valid date input formats.
Karen
Aldo
unread,
Dec 16, 2008, 4:47:11 AM12/16/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Thanks Karen,
Using a combination of both the links you provided I sorted it.
I just needed to change my form slightly
class MyForm(ModelForm):
mydate = forms.DateTimeField(input_formats=['%d-%m-%Y'])
class Meta:
model = MyObject