diff --git a/resources/views/approvals/create.blade.php b/resources/views/approvals/create.blade.php index 600c8d97..2f0440b8 100644 --- a/resources/views/approvals/create.blade.php +++ b/resources/views/approvals/create.blade.php @@ -707,10 +707,22 @@ function switchFormMode(formId) { leaveContainer.style.display = ''; populateLeaveTypes(code); - const today = new Date().toISOString().slice(0, 10); const startEl = document.getElementById('leave-start-date'); const endEl = document.getElementById('leave-end-date'); - if (!startEl.value) startEl.value = today; + const startLabel = document.getElementById('leave-start-label'); + + // 근태신청은 시작일에 시간 선택 가능 + if (code === 'attendance_request') { + startEl.type = 'datetime-local'; + if (startLabel) startLabel.textContent = '시작일시'; + if (!startEl.value) startEl.value = new Date().toISOString().slice(0, 16); + } else { + startEl.type = 'date'; + if (startLabel) startLabel.textContent = '시작일'; + if (!startEl.value) startEl.value = new Date().toISOString().slice(0, 10); + } + + const today = new Date().toISOString().slice(0, 10); if (!endEl.value) endEl.value = today; } else if (code === 'employment_cert') { isCertForm = true; diff --git a/resources/views/approvals/partials/_leave-form.blade.php b/resources/views/approvals/partials/_leave-form.blade.php index cb4a5a8b..8d2c3638 100644 --- a/resources/views/approvals/partials/_leave-form.blade.php +++ b/resources/views/approvals/partials/_leave-form.blade.php @@ -36,7 +36,7 @@ class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline- {{-- 시작일 / 종료일 --}}