diff --git a/src/gui/filedetails/datefieldbackend.cpp b/src/gui/filedetails/datefieldbackend.cpp index 0b806547cced7..036ee7ee8302d 100644 --- a/src/gui/filedetails/datefieldbackend.cpp +++ b/src/gui/filedetails/datefieldbackend.cpp @@ -170,11 +170,11 @@ bool DateFieldBackend::validDate() const { auto valid = _date.isValid(); - if (_minimumDate.isValid()) { + if (_minimumDate.isValid() && minimumDateMsecs() > 0) { valid &= _date >= _minimumDate; } - if (_maximumDate.isValid()) { + if (_maximumDate.isValid() && maximumDateMsecs() > 0) { valid &= _date <= _maximumDate; }