forked from vergnet/application-amicale
Go to next week on weekends
This commit is contained in:
parent
912a30edc6
commit
28168aacf8
2 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue