fix: [approvals] 근태신청 종료일도 종료일시(datetime-local)로 변경
This commit is contained in:
@@ -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 = '';
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user