Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit 94ec384

Browse files
committed
Fixed a bug on Firefox #34
1 parent c2cc126 commit 94ec384

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/angular-datepicker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
$scope.monthNumber += 1;
200200
}
201201
//set next month
202-
$scope.month = $filter('date')(new Date($scope.year + '/' + $scope.monthNumber), 'MMMM');
202+
$scope.month = $filter('date')(new Date($scope.year + '/' + $scope.monthNumber + '/01'), 'MMMM');
203203
//reinit days
204204
$scope.setDaysInMonth($scope.monthNumber, $scope.year);
205205

@@ -233,7 +233,7 @@
233233
$scope.monthNumber -= 1;
234234
}
235235
//set next month
236-
$scope.month = $filter('date')(new Date($scope.year + '/' + $scope.monthNumber), 'MMMM');
236+
$scope.month = $filter('date')(new Date($scope.year + '/' + $scope.monthNumber + '/01'), 'MMMM');
237237
//reinit days
238238
$scope.setDaysInMonth($scope.monthNumber, $scope.year);
239239
//check if min date is ok

0 commit comments

Comments
 (0)