             @onSetStart()
             @onSetEnd()
 
-            @addButton.click()
-        else
-            @addButton.removeClass 'disabled'
+            @$addButton.click()
+        else
+            @$addButton.removeClass 'disabled'
 
 
     toggleAllDay: ->

                error: ->
                    alert 'server error occured'
                complete: =>
                    @addButton.spin false
                    @addButton.html @getButtonText()
                    @addButton.children().show()
                    @popover.selfclose(false)

    handleError: (error) ->

    afterRender: ->
        # Cache jQuery selectors.
        @$container   = @$ '.popover-content-wrapper'
        @$addButton    = @$ '.btn.add'
        @removeButton = @$ '.remove'
        @spinner = @$ '.remove-spinner'
        @duplicateButton = @$ '.duplicate'
