Question

Calendar Default Week View Change

Hi Team,

Is there a way to change the default calendar view so that the week starts on Monday instead of Sunday?

We tried changing the Workweek settings in the calendar, but it did not change the start day of the week.

Our current Creatio version is 8.3.3.3193. Could you please confirm if this change is possible in this version?

Thanks.

Tanu Shree

Like 0

Like

2 comments

Tanu Shree,

You can go to user profile and update the "First day of the weelk"
User profile

To automate it: Crete SQL script - Trigger


-- PART 1: GLOBAL UPDATE FOR EXISTING USERS
-- Applies the default TimeZone (MST) and DateTimeFormat (English - Canada) to all current users with a Contact.

UPDATE "SysAdminUnit" 
SET "DateTimeFormatId" = '6ebc31fa-ee6c-48e9-81bf-8003ac03b019'::uuid, 
    "WeekFirstDayId" = 'b42f7658-b2a1-4139-8595-1ee319cbfb8a'::uuid,
    "TimeZoneId" = 'Mountain Standard Time' 
WHERE "ContactId" IS NOT NULL;

CREATE OR REPLACE FUNCTION fn_sysadminunit_set_defaults()
RETURNS TRIGGER AS $$
BEGIN
   -- Only apply to actual user records (which have a ContactId), ignoring roles/groups.
   IF NEW."ContactId" IS NOT NULL THEN
       NEW."DateTimeFormatId" := '6ebc31fa-ee6c-48e9-81bf-8003ac03b019'::uuid;
        --NEW."LanguageId" = '41c3fb27-9e5a-4a17-a0d7-f8fb7e00bab1'::uuid;
        NEW."WeekFirstDayId" = 'b42f7658-b2a1-4139-8595-1ee319cbfb8a'::uuid;
       NEW."TimeZoneId" := 'Mountain Standard Time';
   END IF;
   
   RETURN NEW;
END;
$$ LANGUAGE plpgsql;


DROP TRIGGER IF EXISTS trg_sysadminunit_set_defaults ON "SysAdminUnit";
CREATE TRIGGER trg_sysadminunit_set_defaults
BEFORE INSERT ON "SysAdminUnit"
FOR EACH ROW
EXECUTE FUNCTION fn_sysadminunit_set_defaults();

Thank You Bhoobalan Palanivelu for the response it worked.

Show all comments