diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index 91e5b75c..543bf5ee 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -358,7 +358,6 @@ export function cleanServiceGroups(groups) { mappings, // customapi widget refreshInterval, integrations, // calendar widget - firstDayInWeek, } = cleanedService.widget; let fieldsList = fields; @@ -444,7 +443,6 @@ export function cleanServiceGroups(groups) { } if (type === "calendar") { if (integrations) cleanedService.widget.integrations = integrations; - if (firstDayInWeek) cleanedService.widget.firstDayInWeek = firstDayInWeek; } } diff --git a/src/widgets/calendar/monthly-view.jsx b/src/widgets/calendar/monthly-view.jsx index 5d4a2b17..383d9881 100644 --- a/src/widgets/calendar/monthly-view.jsx +++ b/src/widgets/calendar/monthly-view.jsx @@ -98,13 +98,13 @@ export default function MonthlyView({ service }) { const dayNames = Info.weekdays("short", { locale: i18n.language }); - const firstDayInWeekCalendar = widget?.firstDayInWeek ? widget?.firstDayInWeek?.toLowerCase() : "monday"; - for (let i = 1; i < dayInWeekId[firstDayInWeekCalendar]; i+=1) { + const firstDayInCalendar = widget?.firstDayInCalendar ? widget?.firstDayInCalendar?.toLowerCase() : "monday"; + for (let i = 1; i < dayInWeekId[firstDayInCalendar]; i+=1) { dayNames.push(dayNames.shift()); } - const daysInWeek = useMemo(() => [ ...Array(7).keys() ].map( i => i + dayInWeekId[firstDayInWeekCalendar] - ), [(firstDayInWeekCalendar)]); + const daysInWeek = useMemo(() => [ ...Array(7).keys() ].map( i => i + dayInWeekId[firstDayInCalendar] + ), [(firstDayInCalendar)]); if (!showDate) { return
;