---
title: Date-range filter
description: Filter data between two calendar dates.
---

A date-range filter accepts a start date, an end date, or both. Each date uses
the `YYYY-MM-DD` format.

The URL value uses `<from>..<to>`. For example, `2026-08-01..2026-08-31` is a
closed range. `2026-08-01..` has no end, and `..2026-08-31` has no start.
Backlit ignores an invalid range or a range in reverse order.

## API

```ts
filters.dateRange(name: string): DateRangeFilterBuilder
```

| Method     | Input    | Result                         |
| ---------- | -------- | ------------------------------ |
| `setLabel` | `string` | Sets the filter-control label. |

## Basic date-range filter

<BacklitExample path="filters/date_range/basic" view="list" />
