Skip to content

Datetime Filter

Use the Pro datetime filter for timestamps that represent exact instants: created times, audit events, log entries, and scheduled executions. Use the Date Filter instead when the source represents a calendar day without a time.

Source code
TypeScriptts
grid.plugins = [AdvanceFilterPlugin];
grid.columns = [
  { prop: 'event', name: 'Event' },
  {
    prop: 'executedAt',
    name: 'Executed at',
    filter: [FILTER_DATETIME],
    size: 210,
  },
];
grid.filter = { date: { timezoneMode: 'utc' } };

return [
  { event: 'Queued', executedAt: '2026-08-26T10:30:14Z' },
  { event: 'Approved', executedAt: '2026-08-26T10:30:15Z' },
  { event: 'Dispatched', executedAt: '2026-08-26T10:30:16Z' },
  { event: 'Completed', executedAt: '2026-08-26T14:45:00Z' },
];
import { AdvanceFilterPlugin, FILTER_DATETIME } from '@revolist/revogrid-pro';
import '@revolist/revogrid-pro/dist/revogrid-pro.css';
grid.plugins = [AdvanceFilterPlugin];
grid.columns = [
{
prop: 'createdAt',
name: 'Created',
filter: [FILTER_DATETIME],
},
];
grid.filter = true;
grid.source = [
{ createdAt: '2026-08-26T10:30:00Z' },
{ createdAt: new Date('2026-08-26T14:45:00Z') },
{ createdAt: 1787741100000 },
];

Accepted source values are Date, epoch milliseconds, and ISO datetimes with Z or an explicit offset. Date-only and offset-free source strings are invalid for this type.

Datetime saved IDs prefix the shared temporal operator name with datetime:

Example saved IDMeaning
datetimeEqualsExact selected second
datetimeBefore / datetimeAfterStrict instant comparison
datetimeOnOrBefore / datetimeOnOrAfterInclusive comparison
datetimeBetweenInclusive selected seconds
datetimeNotEqualNot the selected second
datetimeIsEmpty / datetimeIsNotEmptyShared blank policy
datetimeToday, datetimeLast7Days, datetimeThisWeekRelative calendar periods in the resolved timezone

The popup also provides month, quarter, year, and fiscal-period operators. Read the complete list in the Date Filter operator reference.

grid.filter = {
multiFilterItems: {
createdAt: [
{
id: 1,
type: 'datetimeBetween',
value: {
fromDate: '2026-08-26T09:00',
toDate: '2026-08-26T17:00',
},
relation: 'and',
},
],
},
};

The datetime-local values are interpreted in the resolved timezone. Equality selects one second; between includes the final selected second. Internally these become half-open UTC ranges for reliable local and remote evaluation.

grid.filter = {
date: {
timezoneMode: 'organization',
organizationTimeZone: 'America/New_York',
columns: {
createdAt: {
timezoneMode: 'explicit',
timeZone: 'Europe/Lisbon',
},
},
},
};

With no date policy, the datetime control uses the browser’s local timezone. Configure an IANA timezone when all users must interpret relative periods and wall-clock input consistently.

  • Offset-free source strings such as 2026-08-26T10:30:00 are invalid because they do not identify an instant.
  • A wall-clock value inside a daylight-saving gap does not exist and is rejected.
  • A repeated wall-clock value is ambiguous and is also rejected.
  • Invalid nonblank values fail comparisons; they do not become blank automatically.
  • Do not use datetime for source values such as 2026-08-26; use date.
  • Do not restore datetime state with unprefixed date operator IDs.
  • Do not assume the browser timezone matches the organization’s reporting timezone.
  • Use ISO strings in persisted or remote state; JavaScript Date objects are not JSON-safe AST input.