This commit is contained in:
Kovid Goyal 2014-11-02 20:30:23 +05:30
parent eeed388a5b
commit 6eff053a6b

View File

@ -172,7 +172,7 @@ def make_undoable(spinbox):
else: else:
self.undo_stack.clear() self.undo_stack.clear()
if hasattr(self, 'setDateTime'): if hasattr(self, 'setDateTime'):
if isinstance(val, date) and not val == UNDEFINED_DATE: if isinstance(val, date) and not is_date_undefined(val):
val = parse_only_date(val.isoformat(), assume_utc=False) val = parse_only_date(val.isoformat(), assume_utc=False)
self.setDateTime(val) self.setDateTime(val)
elif hasattr(self, 'setValue'): elif hasattr(self, 'setValue'):