                 if scope.mgCallback
                   scope.mgCallback('start')
 
-              else                            # 체크인/체크아웃 모두 있고, 체크인 버튼을 눌러서 들어오고, 체크아웃 이전으로 선택하면 실행
+              else # 체크인/체크아웃 모두 있고, 체크인 버튼을 눌러서 들어오고, 체크아웃 이전으로 선택하면 실행
                 scope.mgStart = date
                 removeCheckInOut()
                 drawCheckInCheckOut()

      isVisible: (date, day) ->
        new Date(date.getFullYear(), date.getMonth(), day).getMonth() is date.getMonth()
      isDisabled: (currentDate) ->
#        if scope.mgStart and scope.mgEnd and scope.mgButtonName is 'checkout'
#          mindate = new Date scope.mgStart
#          mindate.setDate mindate.getDate() + 1
#        else
#          mindate = scope.restrictions.mindate
        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

      element.parent()[0].scrollTop = monthElement[0].offsetTop

  controller: ['$scope', 'ModalService', 'Calendar', '$compile', (scope, ModalService, Calendar, compile) ->
    # set default value
    if not scope.mgOptions.checkInString
      scope.mgOptions.checkInString = 'check in'
    if !scope.mgOptions.checkOutString
      scope.mgOptions.checkOutString = 'check out'

    scope.weekdays = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
    startSelected = false
    # init pension options
