       scope.dates = []
       arrayMonths = [];
       for monthStart in months
-#        scope.dates.push { text: $filter('date')(monthStart, 'yyyy.MM'), weeks: weeksInMonth monthStart }
         arrayMonths.push {monthText:$filter('date')(monthStart, 'yyyy.MM'), weeks:weeksInMonth(monthStart)}
       drawCalendar(arrayMonths);
 

          classString += ' selected'
        else if scope.mgEnd? and scope.mgEnd.getTime() is dayObj.getTime()
          classString += ' selected'
        #else if scope.mgStart? and scope.mgEnd? and !startSelected and dayObj > scope.mgStart and dayObj < scope.mgEnd
        else if scope.mgStart? and scope.mgEnd? and dayObj > scope.mgStart and dayObj < scope.mgEnd
          classString = 'between-selected'
        else if scope.mgOptions.today?

      isVisible: (date, day) ->
        new Date(date.getFullYear(), date.getMonth(), day).getMonth() is date.getMonth()
      isDisabled: (currentDate) ->
        mindate = scope.restrictions.mindate
        if scope.mgOptions.limitNights? and startSelected
          maxdate = new Date scope.mgStart.getFullYear(), scope.mgStart.getMonth(), scope.mgStart.getDate() + scope.mgOptions.limitNights
