title: jQuery fullCalendar dayClick - convert (date) to mm/dd/yy
body: <p>I am trying to the following:</p>
  
  <ul>
  <li>user clicks on a specific date</li>
  <li>fancybox opens with data entry options</li>
  <li>capture the date on which the calendar was clicked</li>
  <li>grab that date and inject it into the <code>value</code> of a text <code>input</code></li>
  </ul>
  
  <p>This is my code:</p>
  
  <pre><code>$("a#inline").fancybox();
  
  $('#calendar').fullCalendar(
  {
      dayClick: function (date)
      {
          $('a#inline').click();
          $('.datepicker').val(date);
      }
  });
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;a href="#data_entry" id="inline"&gt;Add Event&lt;/a&gt;
  
  &lt;div style="display:none"&gt;
      &lt;div id="data_entry"&gt;
          &lt;form action="events/events_save" method="post" name="events_form" id="events_form"&gt;
           &lt;input type="text" name="date" value="&lt;?php date('m/d/Y'); ?&gt;" class="datepicker"&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I am running into the following issues:</p>
  
  <ul>
  <li><p>when clicking on a date on the calendar the fancybox pops up and I get <code>Mon Apr 25 2011 00:00:00 GMT-0400 (EDT)</code> ==> I need this to be mm/dd/yy like <code>04/25/11</code></p></li>
  <li><p>if right after that I close the fancybox and click on the anchor tag <code>"Add Event"</code>,  the fancybox opens but the date is populated with <code>Mon Apr 25 2011 00:00:00 GMT-0400 (EDT)</code> ==> it should actually contain today's date because of the PHP string I put in the <code>value</code> field (this is fixed only if I refresh)</p></li>
  </ul>
  
  <p>Anyone have suggestions on how to solve either issue?</p>
  
  <p>Thanks a ton.</p>