diff --git a/gemsfx/src/main/java/com/dlsc/gemsfx/daterange/DateRangeView.java b/gemsfx/src/main/java/com/dlsc/gemsfx/daterange/DateRangeView.java index 6003333e..139819fa 100644 --- a/gemsfx/src/main/java/com/dlsc/gemsfx/daterange/DateRangeView.java +++ b/gemsfx/src/main/java/com/dlsc/gemsfx/daterange/DateRangeView.java @@ -41,7 +41,7 @@ public DateRangeView() { selectionModel = new SelectionModel(); selectionModel.setSelectionMode(SelectionModel.SelectionMode.DATE_RANGE); selectionModel.selectionModeProperty().addListener(it -> { - if (selectionModel.getSelectionMode() != SelectionModel.SelectionMode.DATE_RANGE) { + if (!Objects.equals(selectionModel.getSelectionMode(), SelectionModel.SelectionMode.DATE_RANGE)) { throw new UnsupportedOperationException("SINGLE_DATE and MULTIPLE_DATES modes are not supported"); } });