title: Only show first Friday of every month as available to pick - jQuery UI Datepicker
body: <p>I am trying to only allow the first Friday of every month to be selectable in my jQuery UI Datepicker and deny any other date.</p>
  
  <p>I realise I could do this with a combination of PHP and jQuery by getting the date of the first Friday for X months in the future, then adding them to a javascript array that I check against within Datepicker's <code>beforeShowDay</code> - something like this:</p>
  
  <pre><code>var allowedDates = new Array();
  allowedDates[] = &lt;?=date("d/m/Y",strtotime("first Friday of February 2012"))?&gt;
  allowedDates[] = &lt;?=date("d/m/Y",strtotime("first Friday of March 2012"))?&gt;
  allowedDates[] = &lt;?=date("d/m/Y",strtotime("first Friday of April 2012"))?&gt;
  </code></pre>
  
  <p>(I would of course put this in a for loop rather than typing each month manually)</p>
  
  <p>The problem with this is that it is limiting due to me having to specify how far in the future to look.  So is there a way with javascript to check to see if the date checked in Datepicker's <code>beforeShowDay</code> is the first of the month without me having to specify how far into the future to check?</p>
  
  <p>Thanks!</p>