From b1f86677054569374c7500bbf5e8721d6b82997a Mon Sep 17 00:00:00 2001 From: Patrick Mueller Date: Sat, 5 Aug 2023 20:43:44 +0200 Subject: [PATCH] Fix a bug that would wrongly show a date validation error when creating whole day events --- src/app/components/event/event.component.ts | 1 + src/app/pages/admin/admin.component.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/components/event/event.component.ts b/src/app/components/event/event.component.ts index b70213a..ff0256e 100644 --- a/src/app/components/event/event.component.ts +++ b/src/app/components/event/event.component.ts @@ -101,6 +101,7 @@ export class EventComponent implements OnInit { if(this.event.endDateTime < this.event.startDateTime) { this.newEndDate = this.serializeDate(this.event.startDateTime); this.newEndTime = this.serializeTime(this.event.startDateTime); + this.setEndDateTime(); } } } diff --git a/src/app/pages/admin/admin.component.ts b/src/app/pages/admin/admin.component.ts index 383c278..ad64f56 100644 --- a/src/app/pages/admin/admin.component.ts +++ b/src/app/pages/admin/admin.component.ts @@ -18,8 +18,8 @@ export class AdminComponent implements OnInit { password: string = ''; name: string = ''; email: string = ''; - eventFilter: string = 'all'; - eventSorting: string = 'start_asc'; + eventFilter: string = 'future'; // Default value for filter + eventSorting: string = 'start_asc'; // Default value for sorting isActive: boolean = false; registerEmail: string = ''; registerPassword: string = '';