title: Highlighting the dates between a start and end date in JQuery Datepicker
body: <p>I have three datepickers - I have one datepicker which shows a six month span across the top, and then two date pickers beneath that applied to input fields. When the input fields are changed, I want the datepicker across the top of the webpage to highlight the start and end dates, and all the dates in between. </p>
  
  <p>I have so far been able to get it to highlight both the start and end date as you can see in the following code, but I'd really appreciate someones help in how I should go about highlighting the days in between. </p>
  
  <pre><code>    var $test = $.datepicker.formatDate('yy-m-d', $('#date-start').datepicker('getDate'));
      var $test2 = $.datepicker.formatDate('yy-m-d', $('#date-end').datepicker('getDate'));
  
      var dates1 = {};
      dates1[$test] = 'first date';
  
      var dates2 = {};
      dates2[$test2] = 'second date';
  
      $( "#calendar" ).datepicker({
              firstDay: 1,
              numberOfMonths: 6,
              dateFormat: 'yy-mm-dd',
              beforeShowDay: function(date) {
              var search = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate());
  
                      if (dates1[search]) {
  
                        return [true, 'highlight', dates1[search] || ''];
                      }
  
                      if (dates2[search]) {
  
                        return [true, 'highlight', dates2[search] || ''];
  
                      }
  
                      return [false, '', ''];
  
              },
              onSelect: select_arrive,
              minDate: '+' +minimumLeadDays+ 'D',
              onChangeMonthYear: get_availability
      });
  </code></pre>
  
  <p>Thanks for any help in advance!</p>
  
  <p>Edit: 
  Thanks for your help, I'll take a look at those links and see if I can figure it out - thanks again! :)</p>