Added a new config.php setting CALENDAR_FIRST_DAY_OF_WEEK to be able to change the first day of a week used for calendar views (closes #256)

This commit is contained in:
Bernd Bestel
2019-07-06 20:19:21 +02:00
parent 1eb1aa8b11
commit 914dde4609
5 changed files with 23 additions and 2 deletions

View File

@@ -1,4 +1,10 @@
$("#calendar").fullCalendar({
var firstDay = null;
if (!Grocy.CalendarFirstDayOfWeek.isEmpty())
{
firstDay = parseInt(Grocy.CalendarFirstDayOfWeek);
}
$("#calendar").fullCalendar({
"themeSystem": "bootstrap4",
"header": {
"left": "month,basicWeek,listWeek",
@@ -6,6 +12,7 @@
"right": "prev,next"
},
"weekNumbers": true,
"firstDay": firstDay,
"eventLimit": true,
"eventSources": fullcalendarEventSources
});

View File

@@ -1,5 +1,11 @@
var firstRender = true;
var firstDay = null;
if (!Grocy.CalendarFirstDayOfWeek.isEmpty())
{
firstDay = parseInt(Grocy.CalendarFirstDayOfWeek);
}
var calendar = $("#calendar").fullCalendar({
"themeSystem": "bootstrap4",
"header": {
@@ -11,6 +17,7 @@ var calendar = $("#calendar").fullCalendar({
"eventLimit": true,
"eventSources": fullcalendarEventSources,
"defaultView": "basicWeek",
"firstDay": firstDay,
"viewRender": function(view)
{
if (firstRender)