diff --git a/client/app/services/parameters/DateRangeParameter.js b/client/app/services/parameters/DateRangeParameter.js index f24e4ee458..9a052bd1fb 100644 --- a/client/app/services/parameters/DateRangeParameter.js +++ b/client/app/services/parameters/DateRangeParameter.js @@ -135,9 +135,7 @@ class DateRangeParameter extends Parameter { const prefix = this.urlPrefix; if (isObject(this.value) && this.value.start && this.value.end) { return { - [`${prefix}${this.name}`]: null, - [`${prefix}${this.name}.start`]: this.value.start, - [`${prefix}${this.name}.end`]: this.value.end, + [`${prefix}${this.name}`]: `${this.value.start}--${this.value.end}`, }; } return super.toUrlParams(); @@ -146,12 +144,13 @@ class DateRangeParameter extends Parameter { fromUrlParams(query) { const prefix = this.urlPrefix; const key = `${prefix}${this.name}`; - const keyStart = `${prefix}${this.name}.start`; - const keyEnd = `${prefix}${this.name}.end`; if (has(query, key)) { - this.setValue(query[key]); - } else if (has(query, keyStart) && has(query, keyEnd)) { - this.setValue([query[keyStart], query[keyEnd]]); + const dates = query[key].split('--'); + if (dates.length === 2) { + this.setValue(dates); + } else { + this.setValue(query[key]); + } } } diff --git a/client/app/services/parameters/EnumParameter.js b/client/app/services/parameters/EnumParameter.js index 952bc3a126..6999df730e 100644 --- a/client/app/services/parameters/EnumParameter.js +++ b/client/app/services/parameters/EnumParameter.js @@ -48,8 +48,6 @@ class EnumParameter extends Parameter { return { [`${prefix}${this.name}`]: !this.isEmpty ? urlParam : null, - [`${prefix}${this.name}.start`]: null, - [`${prefix}${this.name}.end`]: null, }; } diff --git a/client/app/services/parameters/Parameter.js b/client/app/services/parameters/Parameter.js index d08ececa9c..05ee72cd46 100644 --- a/client/app/services/parameters/Parameter.js +++ b/client/app/services/parameters/Parameter.js @@ -124,8 +124,6 @@ class Parameter { // `null` removes the parameter from the URL in case it exists return { [`${prefix}${this.name}`]: !this.isEmpty ? this.value : null, - [`${prefix}${this.name}.start`]: null, - [`${prefix}${this.name}.end`]: null, }; } diff --git a/client/app/services/parameters/QueryBasedDropdownParameter.js b/client/app/services/parameters/QueryBasedDropdownParameter.js index 86200513ca..7bad235184 100644 --- a/client/app/services/parameters/QueryBasedDropdownParameter.js +++ b/client/app/services/parameters/QueryBasedDropdownParameter.js @@ -32,8 +32,6 @@ class QueryBasedDropdownParameter extends Parameter { return { [`${prefix}${this.name}`]: !this.isEmpty ? urlParam : null, - [`${prefix}${this.name}.start`]: null, - [`${prefix}${this.name}.end`]: null, }; }