title: Get name of day OnChange of Jquery Datepicker
body: <ol>
  <li>Datepicker1 - format [dd/mm/yyy]</li>
  <li>Datepicker2 - will show the name of the day in local. </li>
  </ol>
  
  <p>I need to get the name of the day in the local language for the Datepicker2  when Datepicker1  is selected .
  Will this possible ?</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-js lang-js prettyprint-override"><code>var days = [
    'Minggu',
    'Senin',
    'Selasa',
    'Rabu',
    'Kamis',
    'Jumat',
    'Sabtu'
  ];
  var selecteddate = $("#pickyDate").datepicker('getDate');
  var weekday = days[selecteddate.getDay()];
  
  $('#txt_daypk').val(weekday);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="form-group"&gt;
    &lt;!-- 1st textfield with datepicker --&gt;                                            
    &lt;input type="text" class="form-control" placeholder="tentukan tgl PK"  id="pickyDate" /&gt;  
  &lt;/div&gt;
  
  &lt;div class="form-group"&gt;
    &lt;!-- 2nd textfield for show result weekdays --&gt;   
    &lt;input type="text" class="form-control" placeholder="Hari PK" name="txt_daypk" id="txt_daypk" disabled /&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>So far, i tried js or something like this :</p>
  
  <p>just in case, weekdays in our native :</p>
  
  <pre><code>local = ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu' ];
  default = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ];
  </code></pre>
  
  <p>jquery version i attached in form : </p>
  
  <pre><code>&lt;!-- jQuery --&gt;
  &lt;script src="&lt;?php echo base_url();?&gt;assets/vendor/jquery/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="&lt;?php echo base_url();?&gt;assets/vendor/jquery/jquery-1.11.3.min"&gt;&lt;/script&gt;
  </code></pre>