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
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' },
];Quick start
Section titled “Quick start”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 operators
Section titled “Datetime operators”Datetime saved IDs prefix the shared temporal operator name with datetime:
| Example saved ID | Meaning |
|---|---|
datetimeEquals | Exact selected second |
datetimeBefore / datetimeAfter | Strict instant comparison |
datetimeOnOrBefore / datetimeOnOrAfter | Inclusive comparison |
datetimeBetween | Inclusive selected seconds |
datetimeNotEqual | Not the selected second |
datetimeIsEmpty / datetimeIsNotEmpty | Shared blank policy |
datetimeToday, datetimeLast7Days, datetimeThisWeek | Relative 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.
Start with a range
Section titled “Start with a range”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.
Set an explicit timezone
Section titled “Set an explicit timezone”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.
Invalid and DST values
Section titled “Invalid and DST values”- Offset-free source strings such as
2026-08-26T10:30:00are 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.
Common mistakes
Section titled “Common mistakes”- Do not use
datetimefor source values such as2026-08-26; usedate. - 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
Dateobjects are not JSON-safe AST input.