diff --git a/frontend/market-ticker-app/src/app/search-pairs/search-pairs.component.ts b/frontend/market-ticker-app/src/app/search-pairs/search-pairs.component.ts index 3964cfe..164e90c 100644 --- a/frontend/market-ticker-app/src/app/search-pairs/search-pairs.component.ts +++ b/frontend/market-ticker-app/src/app/search-pairs/search-pairs.component.ts @@ -84,6 +84,11 @@ export class SearchPairsComponent { return; } + if (new Date(this.startDate) > new Date(this.endDate)) { + this.errorMessage = 'Start date must be before end date.'; + return; + } + if (!this.ticker1Valid || !this.ticker2Valid) { this.errorMessage = 'One or both tickers are invalid.'; return;