Skip to content

Commit

Permalink
Fixing day-schedule config/storage
Browse files Browse the repository at this point in the history
  • Loading branch information
emcniece committed Oct 16, 2016
1 parent 70e87e6 commit ad25c0c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,17 @@ app.controller('SchedulerCtrl', ['$scope', function ($scope) {
return;
}
}
$scope.config.daySelection.push(day);
$scope.config.daySelection.push(day.value);
};

$scope.isDaySelected = function (day) {
if(!$scope.config.daySelection){
$scope.config.daySelection = [];
}

for (var i = 0; i < $scope.config.daySelection.length; i++) {
var obj = $scope.config.daySelection[i];
if (day.value === obj.value) {
if (day.value === obj) {
return true;
}
}
Expand Down

0 comments on commit ad25c0c

Please sign in to comment.