diff --git a/src/components/calendar/calendar.js b/src/components/calendar/calendar.js index bf0b7fe1dd6..5383e4e2e5d 100644 --- a/src/components/calendar/calendar.js +++ b/src/components/calendar/calendar.js @@ -30,6 +30,9 @@ // TODO(jelbourn): make aria-live element visibly hidden (but still present on the page). function calendarDirective() { + // Generate a unique ID for each instance of the directive. + var directiveId = 0; + return { template: '
' + @@ -48,6 +51,7 @@ link: function(scope, element, attrs, controllers) { var ngModelCtrl = controllers[0]; var mdCalendarCtrl = controllers[1]; + mdCalendarCtrl.directiveId = directiveId++; mdCalendarCtrl.configureNgModel(ngModelCtrl); } };