title: How to disable specific dates and weekends(sat/sun) using UI-B angular datepicker
body: <p>I am using AngularJS-bootstrap css for components(angular directives).(ui.bootstrap.datepicker). I am calling a service to get all the list of public holidays. How to check if selected date from date picker is in that list or not. If selected date is in that list then disable those date. I also want to disable weekends(Saturday and Sunday)</p>
  
  <pre><code>&lt;div class="form-group"&gt;
                                  &lt;div class="input-group datePicker"&gt;
                                      &lt;input id="dt-processEndDate" name="dt-processEndDate" class="form-control"
                                             type="text" size="10" ng-model-options="{updateOn: 'default'}"
                                             required required-err-message="Process End Date is Required"
                                             uib-datepicker-popup="{{TestVm.datePickerFormat}}"
                                             ng-model="TestVm.processEndDate"
                                             is-open="TestVm.processEndDateDatePicker.isOpen"
                                             datepicker-options="TestVm.datePickerOptions"
                                             close-text="Close" alt-input-formats="TestVm.datePickerAltInputFormats" /&gt;
                                      &lt;span class="input-group-btn"&gt;
                                          &lt;button type="button" ng-model-options="{updateOn: 'default'}" class="btn btn-default" ng-click="TestVm.openProcessEndDateDatePicker()"&gt;
                                              &lt;i class="glyphicon glyphicon-calendar"&gt;&lt;/i&gt;
                                          &lt;/button&gt;
                                      &lt;/span&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
  </code></pre>
  
  <p>Angular Function which retrieves list of all public holidays. response.data has three fields Id, Description and HolidayDate</p>
  
  <pre><code>function publicHolidays() {
              holidayService.GetPublicHolidays().then(function (response) {
                  $scope.holidays = response.data;
              })
          }
  </code></pre>
  
  <p>How can see if my start date is in this list of public holidays and if yes show an alert. Also how can I exclude weekends</p>
  
  <p><code>response.data</code> has</p>
  
  <p><a href="https://i.stack.imgur.com/qTWs4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qTWs4.png" alt="enter image description here"></a></p>
  
  <p>I have tried to disable weekends this way</p>
  
  <pre><code>TestVm.datePickerOptions = {
                  formatYear: 'yy',
                  startingDay: 1,
                  showWeeks: false,
                  dateDisabled: myDisabledDates
  
              };
  </code></pre>
  
  <p>Now I want to know how can I disable those dates which are in <code>response.data.holidayDate</code></p>