web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change calendar page s...
Power Apps
Answered

Change calendar page starting day to monday

(0) ShareShare
ReportReport
Posted on by 83

Good evening,

 

somebody knows how Can I change the calendar page to start the week on Monday?

 

Thanks,

App1.jpg
Categories:
  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    I'm pretty sure that is hard coded into the control.  To do a calendar control that starts on Monday you would need to build your own custom component.

  • Biisorte Profile Picture
    83 on at

    Good morning,

     

    thanks Pstork1. I'm new in Powerapps and it seems very difficult for me. 😞

     

    Somebody can share the code of a calendar starting on monday, please? I don't need anything cool, only something basic.

     

    Thanks

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    As I said in my previous reply

    • There is no way to change the built-in calendar control to start on Monday
    • Building your own would indeed be a very advanced undertaking and I doubt you will find anyone who has done that and can share the component.

    In short, its just not feasible to get a calendar control that starts on Monday.

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Biisorte ,

    Do you want to change the calendar template screen to start from Monday instead of Sunday?

    If so, you need to customize the template. There's no calendar template starting from Monday directly.

    I've made a similar test for your reference:

    1)add the calendar template screen

    319.PNG

     

    2)Customize the template:

    Step1:set iconCalendar1's OnSelect:

    /*resets calendar view and date selection to today*/
    Set(_dateSelected, Today());
    Set(_firstDayOfMonth, DateAdd(Today(), 1 - Day(Today()), Days));
    Set(_firstDayInView, DateAdd(_firstDayOfMonth,-(Mod(Weekday(_firstDayOfMonth)-3,7)+1),Days));
    Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, Months), -1, Days))

    3191.PNG

     Step2: set iconNextMonth1's OnSelect:

    /*changes month view to next month*/
    Set(_firstDayOfMonth, DateAdd(_firstDayOfMonth, 1, Months));
    Set(_firstDayInView, DateAdd(_firstDayOfMonth,-(Mod(Weekday(_firstDayOfMonth)-3,7)+1),Days));
    /*collects calendar events for all days in current month view. Updates _maxDate to prevent duplicate data collection if user returns to this month view*/
    Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, Months), -1, Days));
    If(_lastDayOfMonth > _maxDate, Set(_maxDate, _lastDayOfMonth); Collect(MyCalendarEvents, Office365Outlook.GetEventsCalendarViewV2(_myCalendar.Name, Text(_firstDayOfMonth, UTC), Text(_maxDate, UTC)).value))

    3192.PNG

     

    Step3: set iconPrevMonth1's OnSelect:

    /*changes month view to previous month*/
    Set(_firstDayOfMonth, DateAdd(_firstDayOfMonth, -1, Months));
    Set(_firstDayInView, DateAdd(_firstDayOfMonth,-(Mod(Weekday(_firstDayOfMonth)-3,7)+1),Days));
    Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, Months), -1, Days));
    /*collects calendar events for all days in current month view. Updates _minDate to prevent duplicate data collection if user returns to this month view*/
    If(_minDate > _firstDayOfMonth, Set(_minDate, _firstDayOfMonth); Collect(MyCalendarEvents,
    Office365Outlook.GetEventsCalendarViewV2(_myCalendar.Name, Text(_minDate, UTC), Text(_lastDayOfMonth, UTC)).value))

    3193.PNG

     Step4: set WeekdayGallery1's Items:

    ["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]

    3194.PNG

     

    Then the calendar will start from Monday instead of Sunday.

    The key point is to change the variable _firstDayInView, which decides the first day in the gallery.

    Here's a doc about how to create a custom calendar, I think this will help you a lot:

    https://docs.microsoft.com/en-us/archive/blogs/davidni/building-an-interactive-calendar-view-with-powerapps

     

     

     

    Best regards,

  • Biisorte Profile Picture
    83 on at

    Good morning,

     

    many thanks 

     

     

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Biisorte , 

    Notice the event drop down's Items:

     

    Office365Outlook.CalendarGetTables().value

     

    So after you update events, you need to refresh this data source.

    However, it's not supported to refresh Office365 Outlook when an app running.

    It only refreshed when the app starts.

    So I'm afraid you need to reopen the app to view the updated events.

    If you want to update it when you are designing the app, you just need to remove Office365 Outlook connection and recreate connection with it.

     

    I've figured out an alternative way to solve this limit:
    save data in Office365 Outlook in collection, you just need to refresh the collection.

    For example:

    set the app's OnStart:

    ClearCollect(event,Office365Outlook.CalendarGetTables().value)

    set your update event button's OnSelect:

    Office365Outlook.V4CalendarPostItem(...);
    ClearCollect(event,Office365Outlook.CalendarGetTables().value)

    Then set the dropdownCalendarSelection1's Items to this collection:

    event

    Then after you update the event, the collection will be updated too.

     

    Best regards,

     

  • Biisorte Profile Picture
    83 on at

    Perfect! Thank you very much!! ;))

  • NotARobot Profile Picture
    6 on at

    For the record, there's a simpliest solution using StartOfWeek.Monday (see this link).

    You just have to change this:

    2022-01-19.png

    by adding "StartOfWeek.Monday" after each "_firstDayOfMonth".

     

    Result:

    2022-01-19 (1).png

     

     

     

  • Pioo1979 Profile Picture
    2 on at

    The "dropdownCalendarSelection1" also should be modified

    onSelect:

    //Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days));
    Set(_firstDayInView, DateAdd(_firstDayOfMonth,-(Mod(Weekday(_firstDayOfMonth)-3,7)+1),Days));

     

    Best Regards

  • jhallcb Profile Picture
    2 on at

    Isn't all of this defeating the claim of "Building an app without loads of code"??

     

    The International standard for first day of the week is Monday so why would anyone hard code it to another day with no option to select yourself?  Redesigning the wheel for basic things again same as PowerBI... Lazy Microsoft and their stubborn American programmers again.

     

    Advanced Options>First Day of Week drop down box... it should be that simple not 56 lines of code after an hours research.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard