diff --git a/src/main/webapp/resources/js/base/dataset.js b/src/main/webapp/resources/js/base/dataset.js index 38c3180d..10ae2aa4 100644 --- a/src/main/webapp/resources/js/base/dataset.js +++ b/src/main/webapp/resources/js/base/dataset.js @@ -59,6 +59,10 @@ const dateFormat = { case "string": return value.substr(0, 4) + "-" + value.substr(4, 2) + "-" + value.substr(6, 2); default: return ""; } + }, + + parse(value) { + return isEmpty(value) ? "" : value.replace(/-/gi, ""); } }; @@ -85,6 +89,10 @@ const timeFormat = { return value.substr(0 + offset, 2) + ":" + value.substr(2 + offset, 2) + ":" + value.substr(4 + offset) default: return ""; } + }, + + parse(value) { + return isEmpty(value) ? "" : value.replace(/:/gi, ""); } } @@ -101,6 +109,10 @@ const datetimeFormat = { case "string": return dateFormat.format(value) + " " + timeFormat.format(value); default: return ""; } + }, + + parse(value) { + return isEmpty(value) ? "" : timeFormat.parse(dateFormat.parse(value)).replace(/ /gi, ""); } };