title: jQuery add 7 days to date (input and output type text)
body: <p>I am trying to do a simple page that takes a date (input type TEXT), and once the date is entered, another field will add 7 days to the input and display the date (+7 days) in a text input. My knowledge of jQuery is limited so I may have a small bug... </p>
  
  <pre><code>&lt;html&gt; 
  &lt;head&gt; 
  &lt;title&gt;Date Plus 7 Days&lt;/title&gt; 
  &lt;script type="text/javascript"&gt; 
  $(document).ready(function(){
      function DateFromString(str){ 
          str = str.split(/\D+/);
          str = new Date(str[2],str[0]-1,(parseInt(str[1])+7));
          return MMDDYYYY(str);
      }
      function MMDDYYYY(str) {
          var ndateArr = str.toString().split(' ');
          var Months = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec';
          return (parseInt(Months.indexOf(ndateArr[1])/4)+1)+'/'+ndateArr[2]+'/'+ndateArr[3];
      }
  
      function Add7Days() {
          var date = $('#start_date').val();
          var ndate = DateFromString(date);
          return ndate;
      }
  
      $('#start_date').change(function(){
          $('#end_date') = Add7Days();
      })
  
  });
  
  &lt;/script&gt; 
  &lt;/head&gt; 
  &lt;body&gt; 
  
  Start Date
  &lt;input type="text" id="start_date" value=''&gt; 
  &lt;br&gt;
  End date
  &lt;input type="text" id="end_date" value=''&gt; 
  
  &lt;/body&gt; 
  &lt;/html&gt;  
  </code></pre>
  
  <p>What did I do wrong?</p>
  
  <p>Thanks!</p>