Skip to content

Commit

Permalink
Fix #295
Browse files Browse the repository at this point in the history
  • Loading branch information
hmiguim committed Jul 29, 2021
1 parent ad69490 commit afba02d
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.util.Date;
import java.util.List;

import com.google.gwt.core.client.GWT;
import org.roda.core.data.common.RodaConstants;

import com.databasepreservation.common.client.ViewerConstants;
Expand Down Expand Up @@ -89,14 +90,14 @@ public FilterParameter getFilter() {
Date end = getDateFromInput(inputDateToForDate);
filterParameter = new DateRangeFilterParameter(field, inputDateFromForDate.getDateBox().getValue(), end,
RodaConstants.DateGranularity.DAY);
} else {
} else if (dateIntervalValid(inputDateFromForDate, inputDateToForDate)) {
Date begin = getDateFromInput(inputDateFromForDate);
Date end = getDateFromInput(inputDateToForDate);
filterParameter = new DateRangeFilterParameter(field, begin, end, RodaConstants.DateGranularity.DAY);
} else {
Dialogs.showErrors(messages.advancedSearchDialogTitle(), messages.advancedSearchErrorMessageForDateInvalid(),
messages.basicActionClose());
}
} else {
Dialogs.showErrors(messages.advancedSearchDialogTitle(), messages.advancedSearchErrorMessageForDateInvalid(),
messages.basicActionClose());
}
}

Expand Down

0 comments on commit afba02d

Please sign in to comment.