|
@@ -49,7 +49,8 @@ angular.module('app')
|
49
|
49
|
$scope.getMonday = function(d)
|
50
|
50
|
{
|
51
|
51
|
d = new Date(d);
|
52
|
|
- var day = d.getDay(), diff = d.getDate() - day + (day == 0 ? -6:1); // adjust when day is sunday
|
|
52
|
+ var day = d.getDay();
|
|
53
|
+ var diff = d.getDate() - day + (day == 0 ? -6:1);
|
53
|
54
|
d = new Date(d.setDate(diff));
|
54
|
55
|
d.setHours(0, 0, 0, 0);
|
55
|
56
|
return d;
|
|
@@ -167,6 +168,7 @@ angular.module('app')
|
167
|
168
|
$scope.goToRelativeWeek = function(relativeWeek)
|
168
|
169
|
{
|
169
|
170
|
$scope.selectedDate.setDate($scope.selectedDate.getDate() + (relativeWeek * 7));
|
|
171
|
+ $scope.selectedDate = new Date($scope.selectedDate);
|
170
|
172
|
$scope.loadWeeks();
|
171
|
173
|
};
|
172
|
174
|
|