mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-21 13:30:02 +00:00
Fix view format=date so that it doesn't crash on empty fields
This commit is contained in:
parent
02d3620d93
commit
c7d5905242
@ -148,7 +148,12 @@ ViewWidget.prototype.getValueAsDoubleUrlEncoded = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ViewWidget.prototype.getValueAsDate = function(format) {
|
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) {
|
ViewWidget.prototype.getValueAsRelativeDate = function(format) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user