             scope.watchers.popup.result.handler = scope.$watch 'popup.result', (newVal, oldVal) ->
               if callback
                 callback newVal, oldVal
-#return if newVal is oldVal
-#              return if not newVal
-#              return if angular.equals {}, newVal
-#              if (not scope.bRange)
-#                scope.bModel = getFormattedDate(scope.popup.result)
-#              else
-#                scope.bModel = getFormattedDateRange(scope.popup.result)
             ,
               true
             return scope.watchers.popup.result.handler
           stop: () ->
             scope.watchers.popup.result.handler()
             scope.watchers.popup.result.handler = null
+      watchPopupResult: (callback) ->
+        scope.watchers.popup.result.start (newVal, oldVal) ->
+          return if newVal is oldVal
+          return if not newVal
+          return if angular.equals {}, newVal
+          if (not scope.bRange)
+            scope.bModel = getFormattedDate(scope.popup.result)
+          else
+            scope.bModel = getFormattedDateRange(scope.popup.result)
+          scope.watchers.popup.result.stop()
+          callback newVal, oldVal
       bModel:
         handler: null
         start: (callback) ->

              scope.isSourceReady = true
              scope.watchers.bStartSource.stop()
              scope.watchers.bEndSource.stop()
          scope.watchers.bEndSource.start (val) ->
            return if not val
            isEndSourceReady = true

        scope.popup.state.isOpen = false

    do () ->
      scope.watchers.watchSource (
        scope.watchers.watchPopupResult()
        scope.watchers.watchBModel()
      )
      if not scope.bRange
        scope.bRefresh()
      else
