title: highlight multiple dateranges from jsonArray datepicker (jquery)
body: <p>I'm trying to highlight multiple dateranges, but so far only one seems to work.
  If any other information is required, please ask. new to this.
  Thanks in advance!</p>
  
  <p>jquery script I'm currently using:</p>
  
  <pre><code>var testJson = [{
      "startDate": "2015, 5, 1",
          "endDate": "2015, 5, 4"
  }, {
      "startDate": "2015, 5, 4",
          "endDate": "2015, 5, 11"
  }];
  
  $("#datepicker").datepicker({
  
      beforeShowDay: function(date) {
  
          for(var i = 0; i &lt; testJson.length; i++) {
              startDate = new Date(testJson[i].startDate);
              endDate = new Date(testJson[i].endDate);
  
              if(date &gt;= startDate &amp;&amp; date &lt;= endDate) {
                  return [true, 'ui-state-error', 'Gereserveerd!'];
              }
  
              return [true, '', ''];
          }
      }
  });
  </code></pre>