title: how to disable unavilable dates dynamically in datepicker
body: <p>I'm trying to disable unaviable dates dynamically how can i do this ?</p>
  
  <p>if i give static value like below its working fine</p>
  
  <pre><code>var unavailableDates = ["10-8-2015","24-7-2015","10-7-2015","09-8-2015","09-7-2015","01-12-2015","01-1-2016","11-8-2015"];  
  </code></pre>
  
  <p>if i get this value dynamically its not working how can i solve this ?                                             </p>
  
  <p><a href="http://jsfiddle.net/irfanfiddle/JjPrU/849/" rel="nofollow"><strong>My Fiddle</strong></a> </p>
  
  <pre><code>var unavailableDates = $('#DesignIdUnavialble').html();
  
  function unavailable(date) {
      dmy = date.getDate() + "-" + (date.getMonth() + 1) + "-" + date.getFullYear();
      if ($.inArray(dmy, unavailableDates) == -1) {
          return [true, ""];
      } else {
          return [false, "", "Unavailable"];
      }
  }
  
  $(function() {
      $("#iDate").datepicker({
          defaultDate: new Date("7-7-2015"),
          minDate:0,
          dateFormat: 'dd-mm-yy',
          beforeShowDay: unavailable
      });
  
  });
  </code></pre>
  
  <p>Whats wrong in my code.Anybody help me ?</p>