Skip to content

Commit

Permalink
More stringently check for min and max date validity in date field ba…
Browse files Browse the repository at this point in the history
…ckend

Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra authored and mgallien committed Sep 13, 2023
1 parent 97e7ec3 commit 774918c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/filedetails/datefieldbackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 774918c

Please sign in to comment.