[Django]-How to set MaxDate and MinDate of a SelectDateWidget in Django?

4👍

You use the years= argument:

def someform(forms.Form):
    birthdate = forms.DateField(widget=SelectDateWidget(years=range(1990,2011))

Leave a comment