I have been looking for ways to set my Django form to only accept dates that are today or days in the future. I currently have a jQuery datepicker on the frontend, but here is the form field to a modelform.
Thanks for the help, much appreciated.
date = forms.DateField(
label=_("What day?"),
widget=forms.TextInput(),
required=True)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…