diff --git a/packages/raystack/components/data-table/utils/filter-operations.tsx b/packages/raystack/components/data-table/utils/filter-operations.tsx index 20242946b..d113e1838 100644 --- a/packages/raystack/components/data-table/utils/filter-operations.tsx +++ b/packages/raystack/components/data-table/utils/filter-operations.tsx @@ -168,9 +168,17 @@ const handleStringBasedTypes = ( switch (filterType) { case FilterType.date: { const dateValue = dayjs(value); + let stringValue = ''; + if (dateValue.isValid()) { + try { + stringValue = dateValue.toISOString(); + } catch { + stringValue = ''; + } + } return { value, - stringValue: dateValue.isValid() ? dateValue.toISOString() : '' + stringValue }; } case FilterType.select: