<!-- ////////날짜 검색 시작 { -->
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="//code.jquery.com/ui/1.8.18/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/jquery-ui-git.js"></script>
<script>
$.datepicker.setDefaults({
dateFormat: 'yy-mm',
prevText: '이전 달',
nextText: '다음 달',
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월'],
dayNames: ['일', '월', '화', '수', '목', '금', '토'],
dayNamesShort: ['일', '월', '화', '수', '목', '금', '토'],
dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
showMonthAfterYear: true,
yearSuffix: '년'
});
$(function() {
$("#stx2, #e_Date").datepicker({
dateFormat: 'yy-mm-dd'
});
});
</script>
<!-- 게시판 검색 시작 { -->
<div class="bo_sch_wrap">
<fieldset class="bo_sch">
<h3>검색</h3>
<form name="fsearch" method="get">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="sop" value="and">
<label for="sfl" class="sound_only">검색대상</label>
<!-- 날짜 검색 시작 { -->
<!-- } 날짜검색 끝 -->
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<div class="sch_bar">
<input type="hidden" name="sfl" value="wr_1"<?php echo get_selected($sfl, 'wr_1'); ?>>
<i class="fa fa-calendar" aria-hidden="true"></i> <input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" required id="stx2" class="sch_input" size="25" maxlength="20" placeholder="날짜검색">
<button type="submit" value="검색" class="sch_btn"><i class="fa fa-search" aria-hidden="true"></i><span class="sound_only">검색</span>
</div>
<button type="button" class="bo_sch_cls" title="닫기"><i class="fa fa-times" aria-hidden="true"></i><span class="sound_only">닫기</span></button>
</form>
</fieldset>
<div class="bo_sch_bg"></div>
</div>
이게 지금 사용하고 있는 검색입니다!!
고수님의 말씀은 여기 datepicker 에서
$(function() {
$("#stx2, #e_Date").datepicker({
dateFormat: 'yy-mm-dd'
date함수에서 wr_1만큼 날짜를 빼면된다는 말씀이시죠?
});
});