Django forms DateTimeInput widget- how to specify max date?
问题 I have a form displayed in my Django project, and one of the form fields is a DateTimeInput widget, defined with: presentation_date = mDateTimeField(required=False, label="Presentation date", widget=forms.DateTimeInput(format='%d/%m/%Y %H:%M')) This widget currently displays all dates between the start of last year to the end of this year (01/01/2016- 31/12/2017). However, at the end of last year this caused some issues, as it meant that users were unable to select dates for the beginning of