2024/01/23 교육대상자 확인 팝업 주민번호 앞자리 달력 오류 수정

This commit is contained in:
subsub 2024-01-23 12:00:59 +09:00
parent 8612be3e99
commit edfff72726
2 changed files with 63 additions and 4 deletions

View File

@ -766,9 +766,9 @@ $(document).ready(function(){
<th>주민번호앞자리</th>
<td>
<div class="calendar_wrap">
<duet-date-picker identifier="date" id="dBirth" class="startDate" id="" min="1940-01-01"></duet-date-picker>
<duet-date-picker identifier="date" id="dBirth" class="" id="" min="1940-01-01"></duet-date-picker>
</div>
<script src="${pageContext.request.contextPath}/visitEdu/usr/publish/script/duetdatepicker2.js"></script>
<%-- <script src="${pageContext.request.contextPath}/visitEdu/usr/publish/script/duetdatepicker2.js"></script> --%>
</td>
</tr>
</table>

View File

@ -224,7 +224,7 @@ $(document).ready(function(){
<div class="popup_wrap popType01" tabindex="0" data-tooltip-con="sub36_pop02" data-focus="sub36_pop02" data-focus-prev="sub36_pop02_close">
<div class="popup_tit">
<p>교육대상자 확인</p> <button class="btn_popup_close tooltip-close" data-focus="sub36_pop02_close" title="팝업 닫기"><i></i></button>
<p>교육대상자 1확인</p> <button class="btn_popup_close tooltip-close" data-focus="sub36_pop02_close" title="팝업 닫기"><i></i></button>
</div>
<div class="popup_cont">
@ -248,7 +248,66 @@ $(document).ready(function(){
<th scope=“row”>주민번호앞자리</th>
<td>
<div class="calendar_wrap">
<duet-date-picker identifier="date" id="dBirth" class="startDate" id="" min="1940-01-01"></duet-date-picker>
<duet-date-picker identifier="date" id="dBirth" class="" id="" min="1940-01-01"></duet-date-picker>
<script>
const dBirth = document.querySelector("#dBirth");
var DATE_FORMAT = /^(\d{1,2})\.(\d{1,2})\.(\d{4})$/
dBirth.dateAdapter = {
parse: function parse() {
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""
var createDate = arguments.length > 1 ? arguments[1] : undefined
var matches = value.match(DATE_FORMAT)
if (matches) {
return createDate(matches[3], matches[2], matches[1])
}
},
format: function format(date) {
if (date.getMonth() < 9) {
if (date.getDate() < 10) {
return ""
.concat(date.getFullYear(), ".")
.concat('0', date.getMonth() + 1, ".")
.concat('0', date.getDate())
} else {
return ""
.concat(date.getFullYear(), ".")
.concat('0', date.getMonth() + 1, ".")
.concat(date.getDate())
}
} else {
if (date.getDate() < 10) {
return ""
.concat(date.getFullYear(), ".")
.concat(date.getMonth() + 1, ".")
.concat('0', date.getDate())
} else {
return ""
.concat(date.getFullYear(), ".")
.concat(date.getMonth() + 1, ".")
.concat(date.getDate())
}
}
},
}
// 달력 플러그인 실행
dBirth.localization = {
placeholder: '날짜를 입력하세요',
selectedDateMessage: 'Selected date is',
prevMonthLabel: '이전 달 보기',
nextMonthLabel: '다음 달 보기',
monthSelectLabel: '달 선택',
yearSelectLabel: '년도 선택',
closeLabel: '달력 닫기',
dayNames: ['일', '월', '화', '수', '목', '금', '토'],
monthNames: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
monthNamesShort: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
identifier: "searchStartDt",
name: "eduHopeDt"
}
</script>
</div>
<%-- <script src="${pageContext.request.contextPath}/visitEdu/usr/publish/script/duetdatepicker2.js"></script> --%>
</td>