7045: enable cal switch in editor on empty dates

svn: r23177
This commit is contained in:
Vassilii Khachaturov 2013-09-21 08:57:02 +00:00
parent 58808d39f7
commit 05fae5df80

View File

@ -1616,16 +1616,11 @@ class Date(object):
for d,m,y,sl in zip(*[iter(zl)]*4):
# each of d,m,y,sl is a pair from dateval and value, to compare
for adjusted,original in d,m:
for adjusted,original in d,m,y:
if adjusted != original and not(original == 0 and adjusted == 1):
raise DateError("Invalid day/month {} passed in value {}".
raise DateError("Invalid day/month/year {} passed in value {}".
format(original, value))
adjusted,original = y
if adjusted != original:
raise DateError("Invalid year {} passed in value {}".
format(original, value))
# ignore slash difference
if text: