Do not convert date if already a date
This commit is contained in:
parent
f7a019ed83
commit
e46f4bf01e
|
@ -675,6 +675,9 @@ class AlchemyDateFilter(AlchemyGridFilter):
|
|||
Convert user input to a proper ``datetime.date`` object.
|
||||
"""
|
||||
if value:
|
||||
if isinstance(value, datetime.date):
|
||||
return value
|
||||
|
||||
try:
|
||||
dt = datetime.datetime.strptime(value, '%Y-%m-%d')
|
||||
except ValueError:
|
||||
|
|
Loading…
Reference in a new issue