달력 문의드립니다. 채택완료
음나리
8년 전
조회 5,209
http://rhdtkd77.dothome.co.kr/" target="_self">http://rhdtkd77.dothome.co.kr/
달력을 현재 12월이 아닌 1월달 날짜 아무거나 클릭하면
날짜 선택은 제대로 되지만
달력이 12월로 돌아가버리는데요
혹시 1월 그대로 멈추게 할수있는방법은 없는걸까여?
</p><p><?php</p><p>add_stylesheet('<link type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css" rel="stylesheet" />', 0);</p><p>?></p><p><style type="text/css"> </p><p>.ui-datepicker { font:11px dotum; }</p><p>.ui-datepicker select.ui-datepicker-year { width:60px;}</p><p>.ui-datepicker select.ui-datepicker-month { width:40px;}</p><p></style></p><p> </p><p><script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js"></script></p><p> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"></p><p> <link rel="stylesheet" href="/resources/demos/style.css"></p><p> <script src="<a href="<a href="https://code.jquery.com/jquery-1.12.4.js" target="_blank" rel="noopener noreferrer">https://code.jquery.com/jquery-1.12.4.js</a>"><a href="https://code.jquery.com/jquery-1.12.4.js" target="_blank" rel="noopener noreferrer">https://code.jquery.com/jquery-1.12.4.js</a></a>"></script></p><p> <script src="<a href="<a href="https://code.jquery.com/ui/1.12.1/jquery-ui.js" target="_blank" rel="noopener noreferrer">https://code.jquery.com/ui/1.12.1/jquery-ui.js</a>"><a href="https://code.jquery.com/ui/1.12.1/jquery-ui.js" target="_blank" rel="noopener noreferrer">https://code.jquery.com/ui/1.12.1/jquery-ui.js</a></a>"></script></p><p><script type="text/javascript"> </p><p>//<![CDATA[ </p><p>$(document).ready(function() { </p><p> $("#ap_cal").datepicker({</p><p> dateFormat: 'ymmdd',</p><p> monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],</p><p> changeMonth: true,</p><p> changeYear: true,</p><p> showMonthAfterYear: true,</p><p> //maxDate: "+0D",</p><p> onSelect: function(dateText) {</p><p> location.href = '<?php echo G5_BBS_URL; ?>/search.php?sfl=wr_subject&stx=' + dateText;</p><p> }</p><p> }); </p><p>}); </p><p>//]]> </p><p></script></p><p> </p><p><div id="ap_cal"></div></p><p>
이 달력으로는 그런건 불가능한건가여?
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
채택된 답변
+20 포인트
8년 전
다음과 같이
$("#ap_cal").datepicker({
해당 내용
});
이 스크립트 끝 부분에 setDate 값을 추가해 보세요.
</p><p><script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$("#ap_cal").datepicker({
dateFormat: 'ymmdd',
monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
changeMonth: true,
changeYear: true,
showMonthAfterYear: true,
//maxDate: "+0D",
onSelect: function(dateText) {
location.href = '<?php echo G5_BBS_URL;?>/search.php?sfl=wr_subject&stx=' + dateText;
}
}).datepicker("setDate", "<?php echo $stx;?>");
});
//]]>
</script></p><p>
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인