카테고리 없음

jquery , 달력

예쁜꽃이피었으면 2017. 7. 24. 13:21

https://jqueryui.com/datepicker/#dropdown-month-year




내는 년도와 월을 선택할 수 있는 것을 썼다.




<!doctype html>

<html lang="en">

<head>

  <meta charset="utf-8">

  <meta name="viewport" content="width=device-width, initial-scale=1">

  <title>jQuery UI Datepicker - Display month &amp; year menus</title>

  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">

  <link rel="stylesheet" href="/resources/demos/style.css">

  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>

  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

  <script>

  $( function() {




    $( "#datepicker" ).datepicker({

      changeMonth: true,

      changeYear: true

    });

  } );


   $.datepicker.setDefaults({

        dateFormat: 'yy-mm-dd',

        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: 'Year'  ,

        showOn: "both", 

        buttonImage: "button.png", 

        buttonImageOnly: true 

    });

  </script>

</head>

<body>

 

<p>Date: <input type="text" id="datepicker"></p>

 

 

</body>

</html>






jQuery UI datepicker 한글 적용

* https://zetawiki.com/wiki/JQuery_UI_datepicker_%ED%95%9C%EA%B5%AD%EC%96%B4_%EC%A0%81%EC%9A%A9


jQuery UI datepicker 옵션

* http://www.nextree.co.kr/p9887/


* mysql 에서 기간 검색할 때

select count(*) from table where timestamp between '2016-05-12 00:00:00' and '2016-05-12 23:59:59';



출처: http://ourcstory.tistory.com/102 [쌍쌍바나나의 블로그]



반응형