Skip to content

Date Filter

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:
plugins: [
AdvanceFilterPlugin,
],
  • Add ‘date’ to the column’s filter array:
import { AdvanceFilterPlugin } from '@revolist/revogrid-pro';
const columns = [
{
name: 'Event Date',
prop: 'date',
filter: ['date'], // Enable date filter
}
];

Filter Operators

OperatorDescription
equalsExact date match
beforeDates before specified date
afterDates after specified date
onOrBeforeDates on or before specified date
onOrAfterDates on or after specified date
betweenDates within specified range
notEqualDates not matching specified date
isEmptyEmpty/null date values
isNotEmptyNon-empty date values
todayToday’s dates
yesterdayYesterday’s dates
last7DaysDates within last 7 days
thisMonthDates in current month
lastMonthDates in previous month
thisQuarterDates in current quarter
nextQuarterDates in next quarter
previousQuarterDates in previous quarter
thisYearDates in current year
nextYearDates in next year
previousYearDates in previous year