                     li role: 'presentation',
                         button
                             role:    'menuitem'
-                            onClick: @presetYesterday
+                            onClick: @onYesterday
                             t 'daterangepicker presets yesterday'
 
                     li role: 'presentation',
                         button
                             role:    'menuitem'
-                            onClick: @presetLastWeek
+                            onClick: @onLastWeek
                             t 'daterangepicker presets last week'
 
                     li role: 'presentation',
                         button
                             role:    'menuitem'
-                            onClick: @presetLastMonth
+                            onClick: @onLastMonth
                             t 'daterangepicker presets last month'
 
                     li role: 'presentation',
                         button
                             role:    'menuitem'
-                            onClick: @reset
+                            onClick: @onReset
                             t 'daterangepicker clear'
 
                 div className: 'date-pickers',

        @props.onDateFilter start, end


    reset: ->
        @setState
            isActive:  false
            startDate: ''
            endDate:   '',
            @filterize


    presetYesterday: ->
        @setState
            isActive:  true
            startDate: moment().subtract(1, 'day').format(momentFormat)
            endDate:   moment().subtract(1, 'day').format(momentFormat),
            @filterize


    presetLastWeek: ->
        @setState
            isActive:  true
            startDate: moment().subtract(1, 'week').format(momentFormat)
            endDate:   moment().format(momentFormat),
            @filterize


    presetLastMonth: ->
        @setState
            isActive:  true
            startDate: moment().subtract(1, 'month').format(momentFormat)
            endDate:   moment().format(momentFormat),
            @filterize


    render: ->
        div

        if @state.isActive and not nextProps.active
            # we don't call reset here because we don't want to filterize
            @setState
                isActive    : false
                startDate   : null
                endDate     : null

        else if nextProps.active and not @props.active
            @setState isActive: true
