title: JQuery UI Date Picker - Adding a class to all selected <td>
body: <p>I am trying to add a class to each <code>&lt;td&gt;</code> between two specific dates. Here is my code;</p>
  
  <p><a href="http://jsfiddle.net/7Q4Bt/171/" rel="nofollow">http://jsfiddle.net/7Q4Bt/171/</a></p>
  
  <pre><code>$(function() {
  
    $(".checkin-date__input").attr("placeholder", "mm-dd-yyyy").datepicker({
          dateFormat: "MM d yy",
          minDate: +1,
          showOn: "focus",
          numberOfMonths: 2
      }).on("change", function(e) {
          var curDate = $(this).datepicker("getDate");
          $(this).datepicker("setDate", curDate);
          if($('.checkin-date__input').datepicker("getDate")) {
              $( ".checkout-date__output" ).datepicker( "option", "minDate", $('.checkin-date__input').datepicker("getDate") );
          };
      });
  
      $(".checkout-date__output").attr("placeholder", "mm-dd-yyyy").datepicker({
          dateFormat: "MM d yy",
          minDate: +1,
          showOn: "focus",
          numberOfMonths: 2
      }).on("change", function(e) {
          var curDate = $(this).datepicker("getDate");
          $(this).datepicker("setDate", curDate);
          if($('.checkin-date__input').datepicker("getDate")) {
              $( ".checkout-date__output" ).datepicker( "option", "minDate", $('.checkin-date__input').datepicker("getDate") );
          };
          if($('.checkout-date__output').datepicker('getDate')) {
              console.log($('.ui-datepicker'));
              $('.ui-datepicker').find('.ui-datepicker-current-day').prevAll('td:not(".ui-datepicker-unselectable")').addClass('someClass');
          }
      });
  </code></pre>
  
  <p>The second input is limited by the date which is inputted into the first input.</p>