diff --git a/src/calibre/gui2/metadata/basic_widgets.py b/src/calibre/gui2/metadata/basic_widgets.py index 8532ca9893..6a922ba7d6 100644 --- a/src/calibre/gui2/metadata/basic_widgets.py +++ b/src/calibre/gui2/metadata/basic_widgets.py @@ -57,6 +57,7 @@ def save_dialog(parent, title, msg, det_msg=''): def clean_text(x): return re.sub(r'\s', ' ', x.strip()) + ''' The interface common to all widgets used to set basic metadata class BasicMetadataWidget(object): @@ -1731,6 +1732,8 @@ class DateEdit(make_undoable(QDateTimeEdit), ToMetadataMixin): elif ev.key() == Qt.Key_Equal: ev.accept() self.setDateTime(QDateTime.currentDateTime()) + elif ev.key() == Qt.Key_Up and is_date_undefined(self.current_val): + self.setDateTime(QDateTime.currentDateTime()) else: return super(DateEdit, self).keyPressEvent(ev)