mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-19 08:14:50 +00:00
Fix viewing of date fields
This commit is contained in:
parent
7d0b930335
commit
4cffa58df3
@ -148,8 +148,9 @@ ViewWidget.prototype.getValueAsDoubleUrlEncoded = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ViewWidget.prototype.getValueAsDate = function(format) {
|
ViewWidget.prototype.getValueAsDate = function(format) {
|
||||||
var value = this.getValue();
|
format = format || "YYYY MM DD 0hh:0ss";
|
||||||
if(value) {
|
var value = $tw.utils.parseDate(this.getValue());
|
||||||
|
if(value && $tw.utils.isDate(value) && value.toString() !== "Invalid Date") {
|
||||||
return $tw.utils.formatDateString(value,format);
|
return $tw.utils.formatDateString(value,format);
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
|
Loading…
Reference in New Issue
Block a user