웹프로그래밍

Global It Leader!!


그누보드


 
 

달력과 날짜입력기(DatePicker)

페이지 정보

작성자 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 2,469회 작성일 21-01-28 09:17

본문




                <tr>
                    <th scope="row">행사일</th>
                    <td>
                        <select name='d_year' class='frm_input' itemname='년'>
                            <option value=""></option>
                            <?php
                            $k = date("Y");
                            $j = date("Y") + 3;
                            for($i=$k; $i<$j; $i++) {
                            echo "<option value='{$i}'";
                            if($d_year == $i) { echo " selected='selected'"; } else { }
                            echo ">{$i}</option>";
                            }
                            ?>
                        </select>년
                        <select name='d_month' class='frm_input' itemname='월'>
                            <option value=""></option>
                            <?php
                            for($i=1; $i<13; $i++) {
                            echo "<option value='{$i}'";
                            if($d_month == $i) { echo " selected='selected'"; } else { }
                            echo ">{$i}</option>";
                            }
                            ?>
                        </select>월
                        <select name='d_day' class='frm_input' itemname='월'>
                            <option value=""></option>
                            <?php
                            for($i=1; $i<32; $i++) {
                            echo "<option value='{$i}'";
                            if($d_day == $i) { echo " selected='selected'"; } else { }
                            echo ">{$i}</option>";
                            }
                            ?>
                        </select>일
                    </td>
                </tr>

                <?php include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php'); ?>
                <script>
                    $(function(){
                        // 시작날짜와 끝나는 날짜를 함께 선택해서 사용할때
                        var dates = $( "#datepicker_from, #datepicker_to" ).datepicker({
                            //defaultDate: "+1w",  // 기본선택일이 1 week 이후가 선택되는 옵션
                            changeMonth: true,
                            dateFormat: "yy-mm-dd",  //  년월일 표시방법  yy-mm-dd 또는 yymmdd
                            numberOfMonths: 2,  // 한눈에 보이는 월달력수
                            onSelect: function( selectedDate ) {
                                var option = this.id == "datepicker_from" ? "minDate" : "maxDate",
                                instance = $( this ).data( "datepicker" ),
                                date = $.datepicker.parseDate(
                                instance.settings.dateFormat ||
                                $.datepicker._defaults.dateFormat,
                                selectedDate, instance.settings );
                                dates.not( this ).datepicker( "option", option, date );
                            }
                        });
                    });
                </script>
                <tr>
                    <th scope="row">행사일</th>
                    <td>
                        <input type="text" name="wr_1" class="frm_input" style="width:72px;" readonly id="datepicker_from" value="<?php echo $write["wr_1"]; ?>"> ~
                        <input type="text" name="wr_2" class="frm_input" style="width:72px;" readonly id="datepicker_to" value="<?php echo $write["wr_2"]; ?>">
                    </td>
                </tr> 

댓글목록

등록된 댓글이 없습니다.

전체 59
게시물 검색
그누보드 목록
번호 제목 글쓴이 조회 날짜
59 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 31 03-22
58 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 28 03-22
57 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 128 01-12
56 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 142 01-11
55 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 125 01-11
54 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 255 10-29
53 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 358 09-14
52 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 391 08-21
51 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 396 08-06
50 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 363 08-05
49 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2012 03-22
48 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1293 03-22
47 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4586 08-09
46 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1883 07-22
45 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3943 07-16
44 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2156 06-28
43 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1938 06-20
42 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2380 04-06
41 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2657 02-07
40 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2683 02-03