     $scope.hide = ($event) ->
       $event?.stopPropagation?()
       $scope.visible = false
+      $scope.selecting = true
       $scope.start = null
 
     $scope.prevent_select = ($event) ->


    $scope.show = () ->
      $scope.selection = $scope.model
      _calculateRange()
      _prepare()
      $scope.visible = true

      return if day.disabled

      if $scope.showRanged
        if $scope.selecting
          $scope.start = day.date
          $scope.selecting = false
        else
          $scope.selection = moment().range($scope.start, day.date)
          $scope.start = null
          $scope.selecting = true
      else
        $scope.selection = moment(day.date)
      _prepare()

    $scope.move = (n, $event) ->
