This commit is contained in:
Peter Maquiran
2022-12-21 10:34:15 +01:00
parent 3aff9ff3bc
commit 0af70adda7
5 changed files with 43 additions and 83 deletions
@@ -104,9 +104,11 @@ export class NewEventPage implements OnInit {
this.taskParticipants = this.navParams.get('attendees');
if(this.eventService.calendarNamesAry['Meu calendario']) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.CalendarName = 'Meu calendario'
} else {}
} else {
this.CalendarName = this.eventService.calendarNamesAry[0]
}
}
@@ -178,15 +180,10 @@ export class NewEventPage implements OnInit {
roundTimeQuarterHour() {
var timeToReturn = new Date();
// var minutes = timeToReturn.getMinutes();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
// console.log("MINUTOS: " +minutes);
// console.log("BEFORE MINUTES: " +(Math.round(minutes/15) * 15));
var m = (Math.round(minutes/15) * 15) % 60;
// console.log("AFTER MINUTES: " +m);
var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours;
if (m == 0) {