datepicker를 사용해서 글 수정할때 채택완료
datepicker를 사용해서 날짜를 선택하는 게시판이구요
http://sir.kr/data/editor/1610/31ff36168a87f824b59c6495f4ff42f6_1476257510_3705.JPG" title="31ff36168a87f824b59c6495f4ff42f6_1476257510_3705.JPG">
위의 사진처럼 글 수정시 datepicker는 정상적으로 작동도 하는데
value값은 새로 클릭한 10월3일로 변경되지가 않아서 날짜를 수정해도
데이터에 반영이 되지를 않습니다.ㅠㅠ
뭐가 문제일까요ㅠㅠ....??
작성된 코드는
</p><p> <tr></p><p> <th scope="row"><label for="wr_open_date">오픈날짜<strong class="sound_only">필수</strong></label></th></p><p> <td></p><p> <input name="wr_open_date" id="datepicker1" required class="frm_input required" size="15" value="<?php if($w=='u') {echo $write['wr_open_date'];} ?>" readonly></p><p> </td></p><p> </tr></p><p>
입니다ㅠㅠ
답변 3개
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
</span></p><p><span style="font-size: 13.3333px;"><script type="text/javascript"></span></p><p><span style="font-size: 13.3333px;">jQuery(function($){</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>$.datepicker.regional['ko'] = {</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>closeText: '닫기',</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>prevText: '이전달',</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>nextText: '다음달',</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>currentText: '오늘',</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>monthNames: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>'7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>monthNamesShort: ['1월','2월','3월','4월','5월','6월',</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>'7월','8월','9월','10월','11월','12월'],</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>dayNames: ['일','월','화','수','목','금','토'],</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>dayNamesShort: ['일','월','화','수','목','금','토'],</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>dayNamesMin: ['일','월','화','수','목','금','토'],</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>weekHeader: 'Wk',</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>dateFormat: 'yymmdd',</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>firstDay: 0,</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>isRTL: false,</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>showMonthAfterYear: true,</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>yearSuffix: ''};</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>$.datepicker.setDefaults($.datepicker.regional['ko']);</span></p><p><span style="font-size: 13.3333px;"> </span></p><p><span style="font-size: 13.3333px;"> $('#wr_1').datepicker({</span></p><p><span style="font-size: 13.3333px;"> showOn: 'button',</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>buttonImage: '<?=$board_skin_path?>/img/calendar.gif',</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>buttonImageOnly: true,</span></p><p><span style="font-size: 13.3333px;"> buttonText: "달력",</span></p><p><span style="font-size: 13.3333px;"> changeMonth: true,</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>changeYear: true,</span></p><p><span style="font-size: 13.3333px;"> showButtonPanel: true,</span></p><p><span style="font-size: 13.3333px;"> yearRange: 'c-99:c+99',</span></p><p><span style="font-size: 13.3333px;"><span class="Apple-tab-span" style="white-space:pre"> </span>minDate: '-0d',</span></p><p><span style="font-size: 13.3333px;"> maxDate: '+20d'</span></p><p><span style="font-size: 13.3333px;"> });</span></p><p><span style="font-size: 13.3333px;">});</span></p><p><span style="font-size: 13.3333px;"></script></span></p><p><span style="font-size: 13.3333px;">
입력필드에서는
<input name="wr_1" id="wr_1" required class="frm_input required" size="15" value="<?php if($w=='u') {echo $write['wr_1'];} ?>" readonly>
이런식으로 하시면 됩니다.
댓글을 작성하려면 로그인이 필요합니다.
답변에 대한 댓글 1개
ㅠㅠ
[code]
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
add_stylesheet('<link type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/base/jquery-ui.css" rel="stylesheet" />', 0);
add_stylesheet('<link type="text/css" href="'.G5_PLUGIN_URL.'/jquery-ui/style.css">', 0);
?>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<script>
jQuery(function($){
$.datepicker.regional["ko"] = {
closeText: "닫기",
prevText: "이전달",
nextText: "다음달",
currentText: "오늘",
monthNames: ["1월(JAN)","2월(FEB)","3월(MAR)","4월(APR)","5월(MAY)","6월(JUN)", "7월(JUL)","8월(AUG)","9월(SEP)","10월(OCT)","11월(NOV)","12월(DEC)"],
monthNamesShort: ["1월","2월","3월","4월","5월","6월", "7월","8월","9월","10월","11월","12월"],
dayNames: ["일","월","화","수","목","금","토"],
dayNamesShort: ["일","월","화","수","목","금","토"],
dayNamesMin: ["일","월","화","수","목","금","토"],
weekHeader: "Wk",
dateFormat: "yymmdd",
firstDay: 0,
isRTL: false,
showMonthAfterYear: true,
yearSuffix: ""
};
$.datepicker.setDefaults($.datepicker.regional["ko"]);
$('.ui-datepicker ').css({ "margin-left" : "141px", "margin-top": "-223px"}); //달력(calendar) 위치
});
</script>
[/code]
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
update문에서 없는 필드값이 있었네요.
감사합니다.