mgcrea/angular-strap — pull request #820 by vojtajina (2014-06-07 17:54:41+00:00)
Title: feat(datepicker): accept disabled-dates

This is more of a feature proposal. I'm not saying this is the best implementation - it was just a quick hack to get what I needed.

For instance, it does not implement filtering for month/year views.

Most of the other data pickers allow passing `isDisabled` function to do this imperatively. I think passing an array of data ranges is a better approach. With `isDisabled` approach, it is hard to notify the component that it needs to re-validate dates. For instance, datepicker prepares the view model at the bootstrap and so if you load some data asynchronously, the component is already prepared and won't update the disabled properties - there would have to be another API to "update". That's why I think this approach is better.

It still respects `min-date` and `max-date` - those have higher priority.

----------------------

```html

```

Expects a sorted array of objects with `start`, `end` date properties.
```js
$scope.unavailableDates = [{start: new Date(2014, 3, 3), end: new Date(2014, 3, 5)}];
```

The array is expected to be immutable (it is not deeply watched).
The array is expected to be sorted.