diff --git a/editor/src/formula.js b/editor/src/formula.js index 1880f50..897dcbf 100644 --- a/editor/src/formula.js +++ b/editor/src/formula.js @@ -10,9 +10,11 @@ function date(x) { } if (_.isString(x)) { let r = x.match(/^\[\[(.+)\]\]$/); - return moment(r[1], "DD MMM YYYY") + if (r) { + return moment(r[1], "DD MMM YYYY") + } } - return moment(x); + return moment(x, "YYYY-MM-DD"); } /**