diff --git a/html/include/datepicker.js b/html/include/datepicker.js
index 72de050f70d77ddf6e216dc77fe7ba5184b86e05..d6a21359540a5874e03d63d469a710ed9f640ceb 100644
--- a/html/include/datepicker.js
+++ b/html/include/datepicker.js
@@ -256,8 +256,12 @@ DatePicker.prototype  = {
 
     /* arguments */
     this._relative= h_p["relative"];
-    if (h_p["language"])
+    if (h_p["language"]) {
       this._language = h_p["language"];
+      if (this._language_close.get(this._language) == undefined) {
+        this._language = 'en';
+      }
+    }
     this._zindex = ( h_p["zindex"] ) ? parseInt(Number(h_p["zindex"])) : 999;
     if (!Object.isUndefined(h_p["keepFieldEmpty"]))
       this._keepFieldEmpty  = h_p["keepFieldEmpty"];