diff --git a/src/main/java/org/primefaces/component/api/UICalendar.java b/src/main/java/org/primefaces/component/api/UICalendar.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/primefaces/component/api/UICalendar.java
+++ b/src/main/java/org/primefaces/component/api/UICalendar.java
@@ -318,7 +318,7 @@ public abstract class UICalendar extends HtmlInputText implements InputHolder, T
     public void validateMinMax(FacesContext context) {
         Comparable minDate = (Comparable) getMindate();
         Comparable maxDate = (Comparable) getMaxdate();
-        if (minDate != null && maxDate != null && maxDate.compareTo(minDate) == -1) {
+        if (minDate != null && maxDate != null && maxDate.compareTo(minDate) < 0) {
             String id = getClientId(context);
             String component = this.getClass().getSimpleName();
             throw new FacesException(component + " : \"" + id + "\" minimum date must be less than maximum date.");
Fix #<I>: Sonar suggestion (#<I>)