convertDate วินัย

This commit is contained in:
setthawutttty 2025-03-11 15:19:04 +07:00
parent 7ed5191db1
commit 60dcf38aa2
6 changed files with 45 additions and 38 deletions

View file

@ -36,6 +36,7 @@ const {
success,
dialogConfirm,
dialogRemove,
convertDateToAPI,
} = mixin;
/** ตัวแปร */
@ -353,9 +354,8 @@ function onSubmitConditions() {
function onSubmitAttached() {
dialogConfirm($q, () => {
const formData = new FormData();
const send = date.value !== null ? new Date(date.value).toUTCString() : "";
const activeDate =
dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : "";
const send = convertDateToAPI(date.value) ?? "";
const activeDate = convertDateToAPI(dateLeave.value) ?? "";
formData.append("Location", location.value);
formData.append("SendDate", send);
formData.append("ActiveDate", activeDate);