title: Bootstrap datepicker setDatesDisabled not working on button click
body: <p>Trying to setDatesDisabled on button click for bootstrap datepicker, however it's not working.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="container"&gt;
    &lt;div id="date-range"&gt;
      &lt;div class="range-start"&gt;&lt;/div&gt;
      &lt;div class="range-end"&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;button id="button" class="btn btn-warning"&gt;Disable Dates&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code>$(function() {
    $('#date-range').datepicker({
      inputs: $('.range-start, .range-end'),
      format: 'yyyy-mm-dd',
      datesDisabled: ['2016-04-21', '2016-04-20', '2016-04-13']
    });
  
    $('#button').click(function() {
      $('#date-range').datepicker('setDatesDisabled', ['2016-04-29', '2016-04-30']);
    });
  });
  </code></pre>
  
  <p>Fiddle: <a href="https://jsfiddle.net/kaygee79/953zk742/" rel="nofollow">https://jsfiddle.net/kaygee79/953zk742/</a></p>