       cell = td.querySelector '.cell'
       angular.element(cell).append '<div class="txt txtCheckOut">' + scope.mgOptions.checkOutString + '</div>'
 
+    removeCheckOut = ->
+      elCustom = document.getElementById 'custom-modal'
+      # 체크아웃 글자 remove
+      elCheckOut = elCustom.querySelector '.txtCheckOut'
+      if typeof elCheckOut != 'undefined'
+        angular.element(elCheckOut).remove()
+      # selected removeClass
+      arrSelect = elCustom.querySelectorAll '.selected'
+      if 0 < arrSelect.length
+        checkoutSelected = arrSelect[arrSelect.length - 1]
+        angular.element(checkoutSelected).removeClass 'selected'
+      # between-selected removeClass
+      arrBetween = elCustom.querySelectorAll '.between-selected'
+      for elBetween in arrBetween
+        angular.element(elBetween).removeClass 'between-selected'
+
     removeCheckInOut = () ->
       elCustom = document.getElementById 'custom-modal'
       # 체크인 글자 remove

          # startDate is fixed and only end date will be changed
          if scope.mgOptions.mgPenTodaysDeal
            scope.mgEnd = date
            if scope.mgCallback
              scope.mgCallback('end')
            $timeout (->

      id = $filter('date')(scope.mgStart, 'yyyy.MM')
      monthElement = angular.element document.getElementById(id)
      element.parent()[0].scrollTop = monthElement[0].offsetTop

  controller: ['$scope', 'ModalService', 'Calendar', '$compile', (scope, ModalService, Calendar, compile) ->
    scope.weekdays = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
    startSelected = false
