Go to next week on weekends

This commit is contained in:
Arnaud Vergnet 2020-04-16 10:18:38 +02:00
parent 912a30edc6
commit 28168aacf8
2 changed files with 5 additions and 0 deletions

View file

@ -58,4 +58,8 @@ export default class DateManager {
return this.daysOfWeek[date.getDay()] + " " + date.getDate() + " " + this.monthsOfYear[date.getMonth()] + " " + date.getFullYear();
}
static isWeekend(date: Date) {
return date.getDay() === 6 || date.getDay() === 0;
}
}

View file

@ -191,6 +191,7 @@ class PlanexScreen extends React.Component<Props, State> {
+ OBSERVE_MUTATIONS_INJECTED
+ FULL_CALENDAR_SETTINGS
+ "displayAde(" + groupID + ");" // Reset Ade
+ (DateManager.isWeekend(new Date()) ? "calendar.next()" : "")
+ LISTEN_TO_MESSAGES
+ INJECT_STYLE;