From 4cffa58df30d03435ca135ac77f4f621d45030dc Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 3 Dec 2013 10:09:58 +0000 Subject: [PATCH] Fix viewing of date fields --- core/modules/widgets/view.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/modules/widgets/view.js b/core/modules/widgets/view.js index 537698320..8bf52da91 100755 --- a/core/modules/widgets/view.js +++ b/core/modules/widgets/view.js @@ -148,8 +148,9 @@ ViewWidget.prototype.getValueAsDoubleUrlEncoded = function() { }; ViewWidget.prototype.getValueAsDate = function(format) { - var value = this.getValue(); - if(value) { + format = format || "YYYY MM DD 0hh:0ss"; + var value = $tw.utils.parseDate(this.getValue()); + if(value && $tw.utils.isDate(value) && value.toString() !== "Invalid Date") { return $tw.utils.formatDateString(value,format); } else { return "";