#16: Setting end date automatically if end date is before start
All checks were successful
Jenkins Production Deployment
All checks were successful
Jenkins Production Deployment
This commit is contained in:
parent
0861294534
commit
ab9c579765
|
@ -46,7 +46,6 @@ export class EventComponent implements OnInit {
|
||||||
// Check required fields
|
// Check required fields
|
||||||
if(
|
if(
|
||||||
this.isNullOrBlank(this.event.name) ||
|
this.isNullOrBlank(this.event.name) ||
|
||||||
this.isNullOrBlank(this.event.createdBy) ||
|
|
||||||
this.event.startDateTime == undefined ||
|
this.event.startDateTime == undefined ||
|
||||||
this.event.endDateTime == undefined
|
this.event.endDateTime == undefined
|
||||||
) {
|
) {
|
||||||
|
@ -96,6 +95,14 @@ export class EventComponent implements OnInit {
|
||||||
this.event.startDateTime.setMinutes(newTime.getMinutes());
|
this.event.startDateTime.setMinutes(newTime.getMinutes());
|
||||||
this.event.startDateTime.setSeconds(0);
|
this.event.startDateTime.setSeconds(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set end date accordingly if behind start date
|
||||||
|
if(this.event) {
|
||||||
|
if(this.event.endDateTime < this.event.startDateTime) {
|
||||||
|
this.newEndDate = this.serializeDate(this.event.startDateTime);
|
||||||
|
this.newEndTime = this.serializeTime(this.event.startDateTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setEndDateTime() {
|
setEndDateTime() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user