From 69d781df8a6c51a76fd1337a4dcf2575248fa7f5 Mon Sep 17 00:00:00 2001 From: jjh Date: Fri, 8 Sep 2023 16:15:43 +0900 Subject: [PATCH] =?UTF-8?q?FormFields.get()=20=EC=88=98=EC=A0=95=20data-fm?= =?UTF-8?q?t-type=EA=B0=80=20day,=20time=EC=9D=BC=20=EA=B2=BD=EC=9A=B0=20r?= =?UTF-8?q?eplace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/resources/js/base/base.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/resources/js/base/base.js b/src/main/webapp/resources/js/base/base.js index 7419d679..8f4f8587 100644 --- a/src/main/webapp/resources/js/base/base.js +++ b/src/main/webapp/resources/js/base/base.js @@ -713,7 +713,11 @@ class FormFields { if (input.checked) obj[property] = value; } else { - obj[property] = value; + let dataFmtType = input.getAttribute("data-fmt-type"); + if (["day", "time"].includes(dataFmtType)) + obj[property] = value.replace(/-|:/gi, ""); + else + obj[property] = value; } // log(property, value, "radio" == input.type ? "radio" : "", input.checked ? "checked" : ""); });