FOUR-14062 Date columns are not showing in the user's format by gproly · Pull Request #6184 · ProcessMaker/processmaker

Expand Up @@ -222,15 +222,24 @@ export default { this.resizingColumnIndex = -1; } }, formatDate(date, mask) { const dateTimeFormat = "MM/DD/YY HH:mm"; const dateFormat = "MM/DD/YY"; if (mask === "datetime") { return date === null ? "-" : moment(date).format(dateTimeFormat); formatDate(value, format) { let config = ""; if (typeof ProcessMaker !== "undefined" && ProcessMaker.user && ProcessMaker.user.datetime_format) { if (format === "datetime") { config = ProcessMaker.user.datetime_format; } if (format === "date") { config = ProcessMaker.user.datetime_format.replace(/[\sHh:msaAzZ]/g, ""); } } if (mask === "date") { return date === null ? "-" : moment(date).format(dateFormat); if (value) { if (moment(value).isValid()) { return window.moment(value) .format(config); } return value; } return "-"; }, handleRowClick(row) { this.$emit("table-row-click", row); Expand Down