diff --git a/src/main/resources/META-INF/resources/primefaces/datepicker/0-datepicker.js b/src/main/resources/META-INF/resources/primefaces/datepicker/0-datepicker.js
index <HASH>..<HASH> 100644
--- a/src/main/resources/META-INF/resources/primefaces/datepicker/0-datepicker.js
+++ b/src/main/resources/META-INF/resources/primefaces/datepicker/0-datepicker.js
@@ -1802,7 +1802,9 @@
                     :
                     ((((this.isMultipleSelection() || this.isRangeSelection()) && this.value instanceof Array) ? this.value[0] : this.value) || this.parseValue(new Date()));
 
-                this.updateViewDate(null, viewDate);
+                if(viewDate instanceof Date) {
+                    this.updateViewDate(null, viewDate);
+                }
             }
         },
Fix primefaces#<I>: Only update viewDate if it is really a date (#<I>)