날짜 넣기 달력을 바로 보이게 할 수 있을까요? 채택완료
냉동개구리
9년 전
조회 6,757
</p><p> <?php include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php'); ?> </p><p> <script> </p><p> $(function(){ </p><p> $("#datepicker_from, #datepicker_to").datepicker({ </p><p> changeMonth: true, </p><p> changeYear: true, </p><p> dateFormat: "yy년 mm월 dd일", </p><p> showButtonPanel: true, </p><p> yearRange: "c-99:c+99", </p><p> maxDate: "+365d" </p><p> }); </p><p> }); </p><p> </script> </p><p> <tr> </p><p> <th scope="row">날짜</th> </p><p> <td> </p><p> <input type="text" name="wr_1" class="frm_input" style="width:110px;" readonly id="datepicker_from" value="<?php echo $write["wr_1"]; ?>"> </p><p> </td> </p><p> </tr> </p><p>
스킨이나 팁을 찾아보니...
보통 위와 같은 형태로 해서, 빈칸을 클릭하면 달력창이 떠서 날짜를 선택하는 형태로 되어 있습니다.
클릭해서 달력이 뜨게 하지말고, 아예 달력을 처음부터 보이게 하는 방법은 없을까요?
(기존) <input type="text" name="wr_1" class="frm_input" style="width:110px;" readonly id="datepicker_from" value="<?php echo $write["wr_1"]; ?>">
(수정) <div type="text" name="wr_1" class="frm_input" style="width:110px;" readonly id="datepicker_from" value="<?php echo $write["wr_1"]; ?>"> </div>
...으로 해봤더니 달력이 바로 보이긴 하는데, 선택한 날짜값이 입력이 안되는거 같습니다
댓글을 작성하려면 로그인이 필요합니다.
답변 3개
채택된 답변
+20 포인트
답변에 대한 댓글 3개
�
냉동개구리
9년 전
$("#datepicker_from, #datepicker_to") 를 $("#datepicker_from").focus(); 바꾸니 달력자체가 표시가 안됩니다. $("#datepicker_from").focus(); 를 다른 부분에 넣어야 하는지요?
i
iBNeer
9년 전
아뇨 기존 스크립트를 놔두신채로
[code]
$(function(){
$("#datepicker_from, #datepicker_to").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy년 mm월 dd일",
showButtonPanel: true,
yearRange: "c-99:c+99",
maxDate: "+365d"
});
$("#datepicker_from").focus();
});
[/code]
이렇게요
[code]
$(function(){
$("#datepicker_from, #datepicker_to").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy년 mm월 dd일",
showButtonPanel: true,
yearRange: "c-99:c+99",
maxDate: "+365d"
});
$("#datepicker_from").focus();
});
[/code]
이렇게요
�
냉동개구리
9년 전
아하.....클릭한 효과를 바로 내주는 거군요.
감사합니다!!!!
감사합니다!!!!
댓글을 작성하려면 로그인이 필요합니다.
9년 전
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인