django - How to pass attrs to forms.DateField? -


in forms.py have this:

date_of_birth = forms.datefield(widget=extras.selectdatewidget( years=range(datetime.date.today().year - 15, 1920, -1))) 

to create select. want pass it, attrs={'class': 'form-control'} tried in different ways no results.

that kind of information gets passed widgets:

date_of_birth = forms.datefield(     widget=extras.selectdatewidget(         years=range(datetime.date.today().year - 15, 1920, -1),         attrs={'class': 'form-control',}     ) ) 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -