From 953c53173b9eed8dc430fa2e0ac0f9fab1371b95 Mon Sep 17 00:00:00 2001 From: jiwoo Date: Thu, 29 Feb 2024 11:06:27 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EC=A7=80=EC=9A=B0=20-=20=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=EC=9E=90=20=EA=B8=B0=EC=86=8C=EC=9C=A0=EC=98=88=20?= =?UTF-8?q?=EB=8C=80=EC=83=81=EC=9E=90=20=EB=93=B1=EB=A1=9D=20=EC=A4=91?= =?UTF-8?q?=EB=B3=B5=ED=99=95=EC=9D=B8=20=EC=8B=9C=20=EC=83=9D=EB=85=84?= =?UTF-8?q?=EC=9B=94=EC=9D=BC=20=ED=98=95=ED=83=9C=20(=EB=8B=AC=EB=A0=A5?= =?UTF-8?q?=20>=20=EC=85=80=EB=A0=89=ED=8A=B8=EB=B0=95=EC=8A=A4=20)=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsp/oprtn/cndtnSspnIdtmt/trgtDplctChk.jsp | 117 +++++++++++++++--- .../exprnClsrmInfo/exprnDocumentDashboard.jsp | 2 +- 2 files changed, 100 insertions(+), 19 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/oprtn/cndtnSspnIdtmt/trgtDplctChk.jsp b/src/main/webapp/WEB-INF/jsp/oprtn/cndtnSspnIdtmt/trgtDplctChk.jsp index 30d360ad..7074d92a 100644 --- a/src/main/webapp/WEB-INF/jsp/oprtn/cndtnSspnIdtmt/trgtDplctChk.jsp +++ b/src/main/webapp/WEB-INF/jsp/oprtn/cndtnSspnIdtmt/trgtDplctChk.jsp @@ -43,6 +43,9 @@ return false; } + //생년월일 치환 + $("#DBirth").val($("#birthYear").val()+$("#birthMonth").val()+$("#birthDay").val()); + var data = new FormData(document.getElementById("createForm")); // if(confirm("저장하시겠습니까?")){ @@ -125,22 +128,23 @@ return true; } - // 생년월일 검사 - if($("#DBirth").val().trim() == ""){ - alert("생년월일을 입력해주세요."); - $("#DBirth").focus(); - return true; - }else{ - $("#DBirth").val($("#DBirth").val().replaceAll('.','')) - } - - //생년월일 자리수 검사 - if($("#DBirth").val().length != 8){ - alert("생년월일은 반드시 8자리를 맞춰주세요.\nex)20010102"); - $("#DBirth").focus(); - return true; - } - + if($("#birthYear").val() == ''){ + alert('생년월일 년도를 선택해주세요.'); + $("#birthYear").focus(); + return true; + }; + if($("#birthMonth").val() == ''){ + alert('생년월일 월을 선택해주세요.'); + $("#birthMonth").focus(); + return true; + }; + if($("#birthDay").val() == ''){ + alert('생년월일 일자를 선택해주세요.'); + $("#birthDay").focus(); + return true; + }; + + return false; // 모든 검사를 통과하면 false 반환 @@ -152,6 +156,77 @@ listForm.submit(); } + function birthSelectBoxDraw(){ + $('.birthYear').yearselect({ + start : 1900, + end : new Date().getFullYear(), + emptyOption: true, + emptyText: '선택', + selected:'', + order:'desc' + }) + // 년도를 바꾼다면 일자를 다시 선택하기 + $('.birthYear').change(function(){ + if($(this).next().next().next().next('select.birthDay')){ + if(Number($(this).next().next().next().next('select.birthDay').val()) > 28){ + dayDraw($(this).next().next().next().next('select.birthDay')); + } + } + }); + + $.each($(".birthMonth"), function(idx, elm){ + var selectValue = $(this).attr('selectValue'); + $(this).append($('