title: angular ui datepicker refresh disabled dates
body: <p>Does anyone have a solution to updating angular ui's disabled dates from a server response?</p>
  
  <p><a href="https://github.com/angular-ui/bootstrap/issues/779" rel="nofollow">https://github.com/angular-ui/bootstrap/issues/779</a></p>
  
  <blockquote>
    <p>You should create another directive that will require datepicker's controller. From your
    directive you should call the refreshView of the datepicker to reevalute the disabled dastes.</p>
  </blockquote>
  
  <p>Does anyone have example code for that?</p>
  
  <p>I'm trying to use angular ui datepicker so that the disabled dates are read from a server response. I change the datepicker's min date to force it to refresh.</p>
  
  <p>I saw another stackoverflow page where the user had it refresh, but it relied on the datepicker calendar being clicked. Another one used set the date min attribute as the value of another field.</p>
  
  <p>For me, I have a completely separate field from the date picker. When changed, it sends an http request to the server, and on a successful response the available dates are updated.</p>
  
  <p>The only problem with changing the min date to force a refresh is that sometime's there same but with different dates to disable. I'm looking into changing a datepicker option I do not use to a random value to force a refresh.</p>
  
  <p>Does anyone have a better way? I saw cross controller communication via a service, but this is a different module. I also saw a github issue where the datepicker controller can be </p>