Fixed that datetimepickers not considered the config.php setting CALENDAR_FIRST_DAY_OF_WEEK (closes #334)

This commit is contained in:
Bernd Bestel 2019-09-18 18:46:07 +02:00
parent ce12202c86
commit 991706920f
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -535,3 +535,12 @@ function LoadImagesLazy()
});
}
LoadImagesLazy();
if (!Grocy.CalendarFirstDayOfWeek.isEmpty())
{
moment.updateLocale(moment.locale(), {
week: {
dow: Grocy.CalendarFirstDayOfWeek
}
});
}