Skip to content

Commit dddc4f6

Browse files
committed
Month title fix
1 parent 614d20d commit dddc4f6

5 files changed

Lines changed: 7 additions & 7 deletions

angular-material-calendar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ angular.module("materialCalendar").directive("calendarMd", ["$compile", "$parse"
234234
}
235235

236236
// Set the defaults here.
237-
$scope.titleFormat = $scope.titleFormat || "MMMM yyyy";
237+
$scope.titleFormat = $scope.titleFormat || "LLLL yyyy";
238238
$scope.dayLabelFormat = $scope.dayLabelFormat || "EEE";
239239
$scope.dayLabelTooltipFormat = $scope.dayLabelTooltipFormat || "EEEE";
240240
$scope.dayFormat = $scope.dayFormat || "d";
@@ -292,7 +292,7 @@ angular.module("materialCalendar").directive("calendarMd", ["$compile", "$parse"
292292
var match;
293293
var active = angular.copy($scope.active);
294294
if (!angular.isArray(active)) {
295-
if (angular.equals(active.getYear(), date.getYear()) && angular.equals(active.getMonth(), date.getMonth()) && angular.equals(active.getDate(), date.getDate())) {
295+
if (active && angular.equals(active.getYear(), date.getYear()) && angular.equals(active.getMonth(), date.getMonth()) && angular.equals(active.getDate(), date.getDate())) {
296296
match = true;
297297
}
298298
} else {

0 commit comments

Comments
 (0)