title: cannot read property setdefaults of undefined
body: <p>I want that What's wrong with this?</p>
  <p>This error has occurred.</p>
  <p>&quot;cannot read property 'setdefaults' of undefined datepicker&quot;</p>
  <p>I don't know why this errer<code>enter code here</code></p>
  <p>I did search this error but every say same this answer
  'That jquery should not be declared twice.'
  So I found the place where it was declared twice, but i don't found</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html xmlns="http://www.w3.org/1999/xthml"&gt;
  
  &lt;head&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;link rel="stylesheet" href="//code.jquery.com/ui/1.8.18/themes/base/jquery-ui.css" /&gt;
      &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;!--달력 이벤트--&gt;
  &lt;script&gt;
      
      $.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: '년',
          showOn: 'both', 
          buttonImage: '../css/img/calendar.png',
          buttonImageOnly: true
       });
  
      $(document).ready(function() {    
          $("#chk_dt").datepicker();
      });
  
   function equip_chg(){
      var equip_cd_nm = $('#equip_no &gt; option:selected').attr("value2");
      
      $('#equip_cd_nm').val(equip_cd_nm);
   }
  
  &lt;/script&gt;
  
  &lt;body&gt;
    &lt;th&gt;date&lt;/th&gt;
                              &lt;td&gt;&lt;input type="text" class="calendar" id="chk_dt" name="chk_dt" value=""&gt;&lt;/td&gt;
  
   &lt;script type="text/javascript"&gt;
  
          $(document).ready(function() {
  
               equip_chg()
              
              var chk_dt = document.getElementById("chk_dt").value;
              
              $('#inspector').val("&lt;%=user_nm%&gt;");
  
              //console.log("");
              //오늘날짜
              var date = new Date(); 
              var year = date.getFullYear(); 
              var month = date.getMonth()+1; 
              var day = date.getDate(); 
              // 한자리수일 경우 0을 채워준다. 
              if(month &lt; 10){ 
              month = "0" + month; 
              } 
              if(day &lt; 10){ 
              day = "0" + day; 
              } 
              var today = year + "-" + month + "-" + day
  
              if(chk_dt == ""){
  
                  $('#chk_dt').val(today);  
              }else{
  
                  $('#chk_dt').val(chk_dt);
              }
  
  
          });
      &lt;/script&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>