fix: [approvals] 근태신청 종료일도 종료일시(datetime-local)로 변경

This commit is contained in:
김보곤
2026-03-06 17:46:38 +09:00
parent 47fcaaa3a3
commit a474c26675
2 changed files with 11 additions and 6 deletions

View File

@@ -710,20 +710,25 @@ function switchFormMode(formId) {
const startEl = document.getElementById('leave-start-date');
const endEl = document.getElementById('leave-end-date');
const startLabel = document.getElementById('leave-start-label');
const endLabel = document.getElementById('leave-end-label');
// 근태신청은 시작일에 시간 선택 가능
// 근태신청은 시작일/종료일에 시간 선택 가능
if (code === 'attendance_request') {
startEl.type = 'datetime-local';
endEl.type = 'datetime-local';
if (startLabel) startLabel.textContent = '시작일시';
if (endLabel) endLabel.textContent = '종료일시';
if (!startEl.value) startEl.value = new Date().toISOString().slice(0, 16);
if (!endEl.value) endEl.value = new Date().toISOString().slice(0, 16);
} else {
startEl.type = 'date';
endEl.type = 'date';
if (startLabel) startLabel.textContent = '시작일';
if (!startEl.value) startEl.value = new Date().toISOString().slice(0, 10);
if (endLabel) endLabel.textContent = '종료일';
const today = new Date().toISOString().slice(0, 10);
if (!startEl.value) startEl.value = today;
if (!endEl.value) endEl.value = today;
}
const today = new Date().toISOString().slice(0, 10);
if (!endEl.value) endEl.value = today;
} else if (code === 'employment_cert') {
isCertForm = true;
certContainer.style.display = '';

View File

@@ -41,7 +41,7 @@ class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div style="flex: 1 1 200px; max-width: 300px;">
<label class="block text-sm font-medium text-gray-700 mb-1">종료일 <span class="text-red-500">*</span></label>
<label class="block text-sm font-medium text-gray-700 mb-1"><span id="leave-end-label">종료일</span> <span class="text-red-500">*</span></label>
<input type="date" id="leave-end-date"
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>