MOBILE-3466 calendar: Fix today if server has different timezone
parent
6845834b85
commit
98cf9f959f
|
@ -222,7 +222,7 @@ export class AddonCalendarCalendarComponent implements OnInit, OnChanges, DoChec
|
||||||
let isPast = true;
|
let isPast = true;
|
||||||
|
|
||||||
this.weeks.forEach((week) => {
|
this.weeks.forEach((week) => {
|
||||||
week.days.some((day) => {
|
week.days.forEach((day) => {
|
||||||
day.istoday = day.mday == currentDay;
|
day.istoday = day.mday == currentDay;
|
||||||
day.ispast = isPast && !day.istoday;
|
day.ispast = isPast && !day.istoday;
|
||||||
isPast = day.ispast;
|
isPast = day.ispast;
|
||||||
|
@ -231,11 +231,7 @@ export class AddonCalendarCalendarComponent implements OnInit, OnChanges, DoChec
|
||||||
day.events.forEach((event) => {
|
day.events.forEach((event) => {
|
||||||
event.ispast = this.isEventPast(event);
|
event.ispast = this.isEventPast(event);
|
||||||
});
|
});
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return day.istoday;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue