1👍
✅
Use attributes in form.cleaned_data
to compare. Attributes in cleaned_data
will be of appropriate data type.
e.g.
if form.is_valid():
if form.cleaned_data['time']==datetime.datetime.min:
....
Source:stackexchange.com