From 991706920f79e92af7f8f9ae65816099aa12fe47 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Wed, 18 Sep 2019 18:46:07 +0200 Subject: [PATCH] Fixed that datetimepickers not considered the `config.php` setting `CALENDAR_FIRST_DAY_OF_WEEK` (closes #334) --- changelog/52_UNRELEASED_2019-xx-xx.md | 1 + public/js/grocy.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/changelog/52_UNRELEASED_2019-xx-xx.md b/changelog/52_UNRELEASED_2019-xx-xx.md index e9f4dcbe..e98e2f51 100644 --- a/changelog/52_UNRELEASED_2019-xx-xx.md +++ b/changelog/52_UNRELEASED_2019-xx-xx.md @@ -39,6 +39,7 @@ ### General improvements/fixes - Added a new `config.php` setting `CALENDAR_SHOW_WEEK_OF_YEAR` to configure if calendars should show week numbers (defaults to `true`) +- Fixed that datetimepickers not considered the `config.php` setting `CALENDAR_FIRST_DAY_OF_WEEK` - Improved the handling which entry page to use with disabled feature flags (thanks @nielstholenaar) - Boolean settings provided via environment variables (so the strings `true` and `false`) are now parsed correctly (thanks @mduret) - All uploaded pictures (currently for products and recipes) are now automatically downscaled to the appropriate size when serving them to improve page load times diff --git a/public/js/grocy.js b/public/js/grocy.js index b2f13fff..8d515c08 100644 --- a/public/js/grocy.js +++ b/public/js/grocy.js @@ -535,3 +535,12 @@ function LoadImagesLazy() }); } LoadImagesLazy(); + +if (!Grocy.CalendarFirstDayOfWeek.isEmpty()) +{ + moment.updateLocale(moment.locale(), { + week: { + dow: Grocy.CalendarFirstDayOfWeek + } + }); +}