Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Update filter start date when enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <[email protected]>
  • Loading branch information
tsmock committed Mar 30, 2023
1 parent 8ca6f54 commit 5e2b90b
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,16 @@ private void addTimeFilters(JPanel panel) {

// Listeners
filterByDateCheckbox.addItemListener(itemE -> {
spinner.setEnabled(filterByDateCheckbox.isSelected());
time.setEnabled(filterByDateCheckbox.isSelected());
final boolean isSelected = filterByDateCheckbox.isSelected();
spinner.setEnabled(isSelected);
time.setEnabled(isSelected);
if (isSelected) {
this.startDate.setInstant(convertDateRangeBox(spinnerModel, time));
this.shouldHidePredicate.startDateRefresh = this.startDate.getInstant();
} else {
this.startDate.reset();
this.shouldHidePredicate.startDateRefresh = Instant.MIN;
}
});

spinner.addChangeListener(l -> {
Expand Down

0 comments on commit 5e2b90b

Please sign in to comment.