mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix a regression in 2.8 that caused the clear button next to date fields to set the date to Jan 101 instead of undefined. Fixes #1388061 [clearing pubdate results in "0101" rather than "undefiined"](https://bugs.launchpad.net/calibre/+bug/1388061)
This commit is contained in:
parent
bf6165ebd2
commit
4c82321f66
@ -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):
|
if isinstance(val, date) and not val == UNDEFINED_DATE:
|
||||||
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'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user