diff --git a/searchPages/searchUtils/newSearchPage.component.ts b/searchPages/searchUtils/newSearchPage.component.ts index f81219b0..c1b85d02 100644 --- a/searchPages/searchUtils/newSearchPage.component.ts +++ b/searchPages/searchUtils/newSearchPage.component.ts @@ -360,15 +360,18 @@ export class NewSearchPageComponent { //console.log("checkSelectedRangeFilters: yearFrom: " + yearFrom + " - yearTo: "+yearTo); if(yearFrom) { filter.selectedFromValue = yearFrom; - filter.selectedFromAndToValues = yearFrom; - } - if(yearFrom && yearTo) { - filter.selectedFromAndToValues += "-"; } if(yearTo) { filter.selectedToValue = yearTo; - filter.selectedFromAndToValues += yearTo; } + if(yearFrom && yearTo) { + filter.selectedFromAndToValues = yearFrom + "-" + yearTo; + } else if(yearFrom) { + filter.selectedFromAndToValues = "from " + yearFrom; + } else if(yearTo) { + filter.selectedFromAndToValues = "until " + yearTo; + } + if(!yearFrom && !yearTo) { validDates = false; } diff --git a/searchPages/searchUtils/searchFilter.component.html b/searchPages/searchUtils/searchFilter.component.html index ea3b809e..956eff5a 100644 --- a/searchPages/searchUtils/searchFilter.component.html +++ b/searchPages/searchUtils/searchFilter.component.html @@ -7,38 +7,56 @@