datetime widget: accept empty time field
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3577 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
a9cf186875
commit
247de809fa
1 changed files with 2 additions and 0 deletions
|
@ -232,6 +232,8 @@ class DateFieldInstance(NumberFieldInstance):
|
|||
def unmarshall(self, value):
|
||||
if not value:
|
||||
return None
|
||||
if len(value) > 1 and value[0] and not value[1]:
|
||||
value[1] = 'T00:00:00'
|
||||
value = ''.join(value)
|
||||
if value:
|
||||
return datetime(*(strptime(value, '%Y-%m-%dT%H:%M:%S')[:6]))
|
||||
|
|
Loading…
Add table
Reference in a new issue