# Date Filter
URL: https://pro.rv-grid.com/guides/data-filter/date-filter/
Source: src/content/docs/guides/data-filter/date-filter.mdx
Description: The Date Filter is a powerful feature in RevoGrid that allows you to filter data based on dates using a variety of criteria. It provides an intuitive interface for filtering dates with both standard comparison operators and relative date ranges.
The Date Filter is a powerful feature in RevoGrid that allows you to filter data based on dates using a variety of criteria. It provides an intuitive interface for filtering dates with both standard comparison operators and relative date ranges.

## Features

- Standard date comparison operators (equals, before, after, etc.)
- Relative date ranges (today, this month, last quarter, etc.)
- Date range selection with From/To inputs
- Empty value handling

## Filter Types

### Standard Operators
- Equals - Matches a specific date
- Before - Matches dates before a specific date
- After - Matches dates after a specific date
- On or Before - Matches dates on or before a specific date
- On or After - Matches dates on or after a specific date
- Between - Matches dates in a range
- Not Equal - Matches dates not equal to a specific date
- Is Empty / Is Not Empty - Matches null/undefined/empty cells

### Relative Date Ranges
- Today
- Yesterday
- Last 7 Days
- This Month
- Last Month
- This Quarter
- Next Quarter
- Previous Quarter
- This Year
- Next Year
- Previous Year
- Custom Period (user-defined)

## Usage

To enable the date filter for a column:

- Add the plugin to your grid's plugins array
`import { AdvanceFilterPlugin } from '@revolist/revogrid-pro';`
- Add the plugin to the grid's plugins array:
```typescript
plugins: [
  AdvanceFilterPlugin,
],
```
- Add 'date' to the column's filter array:

```typescript
import { AdvanceFilterPlugin } from '@revolist/revogrid-pro';
const columns = [
  {
    name: 'Event Date',
    prop: 'date',
    filter: ['date'], // Enable date filter
  }
];
```

## Filter Operators

| Operator | Description |
|----------|-------------|
| equals | Exact date match |
| before | Dates before specified date |
| after | Dates after specified date |
| onOrBefore | Dates on or before specified date |
| onOrAfter | Dates on or after specified date |
| between | Dates within specified range |
| notEqual | Dates not matching specified date |
| isEmpty | Empty/null date values |
| isNotEmpty | Non-empty date values |
| today | Today's dates |
| yesterday | Yesterday's dates |
| last7Days | Dates within last 7 days |
| thisMonth | Dates in current month |
| lastMonth | Dates in previous month |
| thisQuarter | Dates in current quarter |
| nextQuarter | Dates in next quarter |
| previousQuarter | Dates in previous quarter |
| thisYear | Dates in current year |
| nextYear | Dates in next year |
| previousYear | Dates in previous year |
