title: jQuery Datepicker disabled dates
body: <p>I am using Keith Wood's great <a href="http://keith-wood.name/datepick.html" rel="nofollow">jQuery Datepicker plugin</a></p>
  
  <p>I am using the datepicker in an admin system to show admin what dates have been booked for a venue. </p>
  
  <p>I have a list of dates (pulled from a database) that are used to display these booked dates on the datepicker. But should admin want to change any of these dates and make the date available, the calendar doesn't allow for me to 'unselect' the already selected date.</p>
  
  <p>this is a scaled down version of the code, but the problem still exists, this code shows the dates of jun 26 &amp; jun 27 as booked, but I cant select them to 'un-book' them.</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  
      var bookedDaysList = [[6, 26], [6, 27]];
  
                  function bookedDays(date, inMonth) { 
                      if (inMonth) {
                          for (i = 0; i &lt; bookedDaysList.length; i++) {
                              if (date.getMonth() + 1 == bookedDaysList[i][0] &amp;&amp;
                                      date.getDate() == bookedDaysList[i][1]) {
                                  return {dateClass: 'datepick-selected',selectable: true}; 
                              } 
                          } 
                      } 
                      return {}; 
                  }
  
                  /* create datepicker */
  
                  jQuery(document).ready(function () {
  
                      jQuery('#show-dates').datepick({
                          dateFormat: 'dd-mm-yy',
                          altFormat: '[m,d]',
                          onDate: bookedDays,
                          buttonImage: 'css/images/datepicker.gif',
                          buttonImageOnly: true,
                          monthsToShow: 3,
                          multiSelect: 999,
                          showOn: 'both'
                      });
                  });
  
  
  &lt;/script&gt;
  </code></pre>