 
             when 'date'
                 if params.range
+                    # Filter by date
                     [before, after] = params.range
+                else
+                    # Reset date filter
+                    type = null
 
             when 'flag'
                 if params.value


        # change here if we add an UI for sorting
        # @props.queryParams is the current value
        before = '-'
        after = '-'
        flag = '-'
        type = params.type
        sort = '-date'

        switch type
            when 'from', 'dest'

            action: 'account.mailbox.messages'
            parameters: [
                @props.accountID, @props.mailboxID,
                '-date', type, flag, before, after
            ]


