---
title: "Date range filter"
manual: "ke_search"
version: "main"
source: "Filters/DateRangeFilter.rst"
rendered: "2026-09-25T08:10:48+00:00"
---

# Date range filter {#daterangefilter}

The date range filter allows the user to enter a start date and an end date and finds results in between these
two dates.

![Date range filter in the frontend](../Images/Filters/daterange-frontend.png)

## Add the date range filter {#add-the-date-range-filter}

1.  Create a filter

    Create a new filter in your search storage page and set the type to "Date range". In opposite to the tag
    based filters there are no filter options to define.

    ![Add a new filter of type "date range"](../Images/Filters/daterange-create-filter.png)
1.  Add filter to search plugin

    Then add that filter to the list of filters which should be displayed in your search box plugin.

    ![Add the filter to the searchbox plugin](../Images/Filters/daterange-select-filter.png)

## Where the date is fetched from {#where-the-date-is-fetched-from}

The date which is used for filtering is the same date which is used if the results are sorted by date. It is the
field `sortdate` in the index table.

The page indexer fetches the date from the database field `SYS_LASTCHANGED` which is set by TYPO3 internally to the
date when the page has been updated the last time. This can be overwritten by editors by setting the
**Last update** field in the **Metadata** tab of the page properties.

The news indexer fetches the date from the "Date & Time" field of EXT:news.

## Templating {#templating}

Use a custom template for `Partials/Filters/DateRange.html`.
