title: jquery datepicker getdate format
body: <p>I have two problems in this code using jquery datepicker (first is alert the getdate method with time but I need the date only in format(yyyy-mm-dd)) the second problem I need to get the selected date into the textbox but it gives me error</p>
  
  <pre><code>&lt;script src="jquery-1.11.1.min.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" type="text/css" href="jquery.datepick.css"&gt; 
  &lt;script type="text/javascript" src="jquery.plugin.js"&gt;&lt;/script&gt; 
  &lt;script type="text/javascript" src="jquery.datepick.js"&gt;&lt;/script&gt;
  &lt;script src="jquery.chained.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function(){
  $('#popupDatepicker').datepick({
  dateFormat: 'yyyy-mm-dd',
  onSelect: function(){
  var fullDate = $('#popupDatepicker').datepick('getDate');   
  document.getElementByID('maach_year').value=fullDate;             
  alert (fullDate);
  }
  });
  });
  &lt;/script&gt;
  &lt;form action='".$server['PHP_SELF']."' method='post'&gt;
  &lt;table&gt;
  &lt;tr&gt;&lt;td&gt;Birth Date:&lt;/td&gt;&lt;td&gt;&lt;input type='date' id='popupDatepicker' size='15'     name='birth_day'&gt;&lt;/td&gt;
   &lt;td&gt;Retirement Date:&lt;/td&gt;&lt;td&gt;&lt;input type='text' size='15' id='maach_year'  name='maach_year' &gt;&lt;/td&gt;&lt;/tr&gt; 
  &lt;input type='submit'/&gt;&lt;br&gt;
  &lt;/table&gt; 
  &lt;/form&gt;
  </code></pre>
  
  <p>I want also if I can add 65 to years that user select in the birth date, put it in the retirement textbox
  Thanks in Advance</p>