Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Handle case of clearing date to ''

Oliver Güntheraecfdbcf9934
diff --git a/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.ts b/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.ts
index 4fa68e3e611..eaf50eaec36 100644
--- a/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.ts
+++ b/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.ts
@@ -103,7 +103,13 @@ export class FilterDateTimesValueComponent extends AbstractDateTimeValueControll
}
public parseBegin(date:string|null) {
- if (date && validDate(date)) {
+ if (date === null || !validDate(date)) {
+ return;
+ }
+
+ if (date === '') {
+ this.begin = date;
+ } else {
const parsed = this
.timezoneService
.parseISODatetime(date)
@@ -115,7 +121,13 @@ export class FilterDateTimesValueComponent extends AbstractDateTimeValueControll
}
public parseEnd(date:string|null) {
- if (date && validDate(date)) {
+ if (date === null || !validDate(date)) {
+ return;
+ }
+
+ if (date === '') {
+ this.end = date;
+ } else {
const parsed = this
.timezoneService
.parseISODatetime(date)