Is there a way in which you can get the "SelectD开发者_如何学编程ateWidget" to display the years in reverse or DESC order?
my_form_field = forms.DateField(widget=MonthYearWidget(years=range(2012,1970)))
Does not seem to work.
MonthYear widget is a smaller breakdown that only gives you the month and year
Try years=range(2012,1970,-1)
(note the -1 as the step/increment).
精彩评论