diff --git a/core/modules/widgets/view.js b/core/modules/widgets/view.js index 517616e2b..d23abe427 100755 --- a/core/modules/widgets/view.js +++ b/core/modules/widgets/view.js @@ -148,7 +148,12 @@ ViewWidget.prototype.getValueAsDoubleUrlEncoded = function() { }; ViewWidget.prototype.getValueAsDate = function(format) { - return $tw.utils.formatDateString(this.getValue(),format); + var value = this.getValue(); + if(value) { + return $tw.utils.formatDateString(value,format); + } else { + return ""; + } }; ViewWidget.prototype.getValueAsRelativeDate = function(format) {