diff --git a/etemplate/js/et2_widget_date.js b/etemplate/js/et2_widget_date.js index 3861016cb4..e1f7ab8175 100644 --- a/etemplate/js/et2_widget_date.js +++ b/etemplate/js/et2_widget_date.js @@ -393,7 +393,7 @@ var et2_date = et2_inputWidget.extend( // Convert to timestamp - no seconds this.date.setSeconds(0,0); - return this.date.toJSON().replace(/\.\d{3}Z$/, 'Z'); + return this.date?this.date.toJSON().replace(/\.\d{3}Z$/, 'Z'):this.date; } }); et2_register_widget(et2_date, ["date", "date-time", "date-timeonly"]);