title: To Show only Last 7 days from Todays Date using jQuery UI Datepicker
body: <p>Can anyone please help, to show only last 7 days from Today's date with using jQuery UI Picker.</p>
  
  <p>This is what I have so far.</p>
  
  <pre><code>function getMinDate(){ 
      var minDate = new Date(); //alert(minDate.getDate() - (7));    
      minDate.setDate(minDate.getDate() - (7)); 
  } 
  $(document).ready(function(){ 
      $("#dt_store_visited_at").datepicker({ 
         "dateFormat": "dd-mm-yy", 
         "minDate": getMinDate(), 
         "maxDate": new Date() 
      }).attr("readonly", true); 
  });
  </code></pre>