| 카테고리1 | 프로그래밍 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 카테고리2 | JAVA | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 제목 | datepicker 간단 세팅 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 작성자 | 고성훈 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 작성일 | 2021-05-24 04:13:29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<div>$(function(){ </div><div><span style="white-space:pre"> </span>var dateToday = new Date(); </div><div><span style="white-space:pre"> </span>var yrRange = (dateToday.getFullYear()-50) + ":" + (dateToday.getFullYear()); // 연도 선택 selectbox 범위</div><div><span style="white-space:pre"> </span>$.datepicker.setDefaults({ </div><div><span style="white-space:pre"> </span>dateFormat: 'yy-mm-dd'</div><div><span style="white-space:pre"> </span>, closeText: '닫기'</div><div><span style="white-space:pre"> </span>, prevText: '이전달'</div><div><span style="white-space:pre"> </span>, nextText: '다음달'</div><div><span style="white-space:pre"> </span>, currentText: '오늘'</div><div><span style="white-space:pre"> </span>, monthNames: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']</div><div><span style="white-space:pre"> </span>, monthNamesShort: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']</div><div><span style="white-space:pre"> </span>, dayNames: ['일', '월', '화', '수', '목', '금', '토']</div><div><span style="white-space:pre"> </span>, dayNamesShort: ['일', '월', '화', '수', '목', '금', '토']</div><div><span style="white-space:pre"> </span>, dayNamesMin: ['일', '월', '화', '수', '목', '금', '토']</div><div><span style="white-space:pre"> </span>, weekHeader: 'Wk'</div><div><span style="white-space:pre"> </span>, firstDay: 0</div><div><span style="white-space:pre"> </span>, isRTL: false</div><div><span style="white-space:pre"> </span>, duration: 200</div><div><span style="white-space:pre"> </span>, showAnim: 'show'</div><div><span style="white-space:pre"> </span>, changeMonth: true</div><div><span style="white-space:pre"> </span>, changeYear: true</div><div><span style="white-space:pre"> </span>//, yearRange: 'c-10:c'</div><div><span style="white-space:pre"> </span>, showMonthAfterYear: true</div><div><span style="white-space:pre"> </span>, yearSuffix: '년'</div><div><span style="white-space:pre"> </span>, yearRange: yrRange</div><div><span style="white-space:pre"> </span>, showOtherMonths: true</div><div><span style="white-space:pre"> </span>, // 나머지 날짜도 화면에 표시 selectOtherMonths: true</div><div><span style="white-space:pre"> </span>, // 나머지 날짜에도 선택을 하려면 true </div><div><span style="white-space:pre"> </span>}); </div><div><span style="white-space:pre"> </span>$("#아이디").datepicker(); </div><div><span style="white-space:pre"> </span>$(".클래스").datepicker(); </div><div><span style="white-space:pre"> </span>})</div> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||