diff --git a/docs/content/doc/usage/filters.md b/docs/content/doc/usage/filters.md index 81627da49..b7885efc9 100644 --- a/docs/content/doc/usage/filters.md +++ b/docs/content/doc/usage/filters.md @@ -33,6 +33,8 @@ The available fields for filtering include: You can date math to set relative dates. Click on the date value in a query to find out more. +All strings must be either single-word or enclosed in `"` or `'`. This extends to date values like `2024-03-11`. + ## Operators The available operators for filtering include: diff --git a/frontend/src/views/project/helpers/useGanttFilters.ts b/frontend/src/views/project/helpers/useGanttFilters.ts index b245a16f5..dfe8ccd8b 100644 --- a/frontend/src/views/project/helpers/useGanttFilters.ts +++ b/frontend/src/views/project/helpers/useGanttFilters.ts @@ -79,7 +79,7 @@ function ganttFiltersToApiParams(filters: GanttFilters): TaskFilterParams { return { sort_by: ['start_date', 'done', 'id'], order_by: ['asc', 'asc', 'desc'], - filter: 'start_date >= ' + isoToKebabDate(filters.dateFrom) + ' && start_date <= ' + isoToKebabDate(filters.dateTo), + filter: 'start_date >= "' + isoToKebabDate(filters.dateFrom) + '" && start_date <= "' + isoToKebabDate(filters.dateTo) + '"', filter_include_nulls: filters.showTasksWithoutDates, } }