mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
validated the last ocurrence date
This commit is contained in:
@@ -50,6 +50,7 @@ export class NewEventPage implements OnInit {
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
public color: ThemePalette = 'primary';
|
||||
currentDate = new Date();
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
@@ -279,7 +280,7 @@ export class NewEventPage implements OnInit {
|
||||
CalendarName: new FormControl(this.postEvent.CalendarName, [
|
||||
Validators.required
|
||||
]),
|
||||
Date: new FormControl(this.dateValid, [
|
||||
Date: new FormControl(new Date(this.postEvent.StartDate).getTime() <= new Date(this.postEvent.EndDate).getTime()? 'ok': null,[
|
||||
Validators.required
|
||||
]),
|
||||
Categories: new FormControl(this.postEvent.Category, [
|
||||
@@ -288,6 +289,10 @@ export class NewEventPage implements OnInit {
|
||||
participantes: new FormControl(this.taskParticipants, [
|
||||
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
|
||||
]),
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user