Hi all.
I’m sorry to disturb you, but I got a question about forms / widgets, and I can’t find answer…
I’ll try to be the more specific possible.
In a model.py, I got this:
date_sortie = models.DateField('Release date', null=True)
In ModelAdmin, if this field is print by default, I’ll got a field (OK) and a widget (a calendar icon, if I click on it, it fill the field with selected date).
However, if I add this field in forms.py, I lost this widget !
date_sortie = forms.DateField(label='Release year', required=False)
I tried several things and stuff (from Internet), without succes.
date_sortie = forms.DateField(label='Release year', required=False, widget=SelectDateWidget)
If I try what documentation says (Widgets | Django documentation | Django), with the below code, I get a NameError: name 'SelectDateWidget' is not defined
Any ideas to have this default widget (just a date selector, I don’t want to twick it).
Thanks a lot…
Regards,