     getInitialState: ->
         isActive:  @props.active
         label:     t 'daterangepicker placeholder'
-        startDate: ''
-        endDate:   ''
+        startDate: null
+        endDate:   null
 
 
     shouldComponentUpdate: (nextProps, nextState) ->

                    li role: 'presentation',
                        button
                            role:    'menuitem'
                            onClick: @presetYesterday
                            t 'daterangepicker presets yesterday'

                    li role: 'presentation',
                        button
                            role:    'menuitem'
                            onClick: @presetLastWeek
                            t 'daterangepicker presets last week'

                    li role: 'presentation',
                        button
                            role:    'menuitem'
                            onClick: @presetLastMonth
                            t 'daterangepicker presets last month'

                    li role: 'presentation',
                        button
                            role:    'menuitem'
                            onClick: @reset
                            t 'daterangepicker clear'

                div className: 'date-pickers',

        @props.onDateFilter start, end


    onReset: ->
        @changeDates()

    onYesterday: ->
        @changeDates 'day'

    onLastWeek: ->
        @changeDates 'week'

    onLastMonth: ->
        @changeDates 'month'

    changeDates: (type) ->
        value = moment().subtract(1, type).startOf(type) if type
        state =
            isActive    : !!type
            startDate   : value?.format momentFormat
            endDate     : value?.endOf(type).format momentFormat

        @setState state, @filterize

    render: ->
        div
