Reputation: 2581
class PersonalForm(ModelForm):
class Meta:
model = InfoPersonal
widgets = {'dateofbirth' : SelectDateWidget()}
Just the simple implementation gives a dropdown for the Year starting from 2011. I would rather have my users not be newborn babies. How do I customize this ?
Upvotes: 3
Views: 1655
Reputation: 31951
You can pass years
argument wiith list of years in any order. For example
SelectDateWidget(years=range(1950, 2012))
Upvotes: 10