Fix viewing of date fields

print-window-tiddler
Jermolene 2013-12-03 10:09:58 +00:00
rodzic 7d0b930335
commit 4cffa58df3
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -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 "";