This commit is contained in:
Kovid Goyal 2016-11-23 13:24:26 +05:30
parent 9a8447961e
commit 9392c1972b

View File

@ -1734,6 +1734,8 @@ class DateEdit(make_undoable(QDateTimeEdit), ToMetadataMixin):
self.setDateTime(QDateTime.currentDateTime()) self.setDateTime(QDateTime.currentDateTime())
elif ev.key() == Qt.Key_Up and is_date_undefined(self.current_val): elif ev.key() == Qt.Key_Up and is_date_undefined(self.current_val):
self.setDateTime(QDateTime.currentDateTime()) self.setDateTime(QDateTime.currentDateTime())
elif ev.key() == Qt.Key_Tab and is_date_undefined(self.current_val):
ev.ignore()
else: else:
return super(DateEdit, self).keyPressEvent(ev) return super(DateEdit, self).keyPressEvent(ev)