                     class: 'drm-calendar-header'
                     text: _headingText
                 
-                _calendar.appendTo ".#{self.calendarClass}"
-                _heading.prependTo ".#{self.calendarInnerClass}"
-
-                $.each self.events, ->
-                    self.addEventsToCalendar @
+                _calendar.appendTo calendar
+                _heading.prependTo calendar.find(".#{self.calendarInnerClass}")
+
+                $.each events, ->
+                    self.addEventsToCalendar @, calendar
 
                 $('.drm-calendar-year-prev').text lastYear
                 $('.drm-calendar-year-next').text nextYear

                $('.drm-calendar-week-prev, .drm-calendar-week-next').show()
                $('.drm-calendar-date-prev, .drm-calendar-date-next').hide()

            createDate: (newDate) ->
                dayListHtml = "<ul class='drm-week drm-day #{weekClass}' data-week='#{weekNumber}'>"
                $.each self.hours, ->
                    _hour = @name


        switch self.view
            when 'month' then views.createMonth newDate, calendar
            when 'week' then views.createWeek newDate, calendar
            when 'date' then views.createDate newDate, calendar