validated the last ocurrence date

This commit is contained in:
EQUILIBRIUM\hirondino.van-dunem
2022-07-06 09:12:57 +01:00
parent a25eea749e
commit 3a3ba605dd
8 changed files with 19 additions and 3 deletions
@@ -247,6 +247,9 @@ export class EditEventPage implements OnInit {
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
Validators.required
]),
dateOccurrence: new FormControl(this.postEvent.EventRecurrence.Type.toString() == '-1' ? ['ok']: this.postEvent.EventRecurrence.LastOccurrence && new Date(this.postEvent.EventRecurrence.LastOccurrence).getTime() > new Date(this.postEvent.EndDate).getTime() ? 'ok': null, [
Validators.required
]),
Date: new FormControl(new Date(this.postEvent.StartDate).getTime() <= new Date(this.postEvent.EndDate).getTime()? 'ok': null,[
Validators.required
]),