I've the following array with numbers that are representing days of week:
- 0 is for sunday
- 6 is for saturday
var available = [1, 2, 3... whatever];
It loads the days dynamically from for cycle:
for (var i = 0; i < data.length; i++) {
var pos = data[i].position;
available.push(pos);
}
I assign a function called "severalDays" that filters the days available:
$scope.severalDays = function(date) {
// I want access to available array here
}
In my HTML I've the md-datepicker line:
<md-datepicker ng-model="availableCalendar" md-date-filter="severalDays"></md-datepicker>
How I could do it?