From 4e3fc0b0ad0822158d15078ca4468bea22670097 Mon Sep 17 00:00:00 2001 From: Vasiliy Zverev Date: Wed, 6 Apr 2016 20:39:42 +0300 Subject: [PATCH] fixed sync of input value to calendar when using MomentJS --- doc.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc.tpl b/doc.tpl index 2e9222a..22eb03e 100644 --- a/doc.tpl +++ b/doc.tpl @@ -367,7 +367,7 @@ jQuery('#_datetimepicker_weekends_disable').datetimepicker({
$.datetimepicker.setDateFormatter({
     parseDate: function (date, format) {
         var d = moment(date, format);
-        return d.isValid() ? d : false;
+        return d.isValid() ? d.toDate() : false;
     },
     
     formatDate: function (date, format) {