Skip to main content

Notifications

Community site session details

Community site session details

Session Id : blbUoiN73cKhAMq2S27BtN
Power Apps - Building Power Apps
Answered

Starting day of the week (Sunday to Monday)

Like (0) ShareShare
ReportReport
Posted on 4 Apr 2022 11:32:35 by

Hello everyone!

 

I am making a custom gallery calendar, and I have a label with the following formula: Calendar.WeekdaysShort()

 

By default, the starting day of the week is Sunday, but I would like it to be Monday

 

Picture context: "vas" means "sun", "hét" means "mon" etc...

I would like it to be to start from Monday.

2022-04-04_13h29_21.png

  • iburkart Profile Picture
    24 on 14 Sep 2022 at 13:37:00
    Re: Starting day of the week (Sunday to Monday)

    @usaman45 You need to slightly change the visible attribute of the Title inside the MonthDayGallery

    !(DateAdd(_firstDayInView,ThisItem.Value,Days) - Weekday(DateAdd(_firstDayInView,ThisItem.Value,Days),StartOfWeek.Monday) + 1 > _lastDayOfMonth)

    You need to add StartOfWeek.Monday inside the Weekday function. That way the number starts at 1 on a Monday and not on a Sunday.

  • usaman45 Profile Picture
    314 on 23 Jun 2022 at 20:58:35
    Re: Starting day of the week (Sunday to Monday)

    Great, but it looks missing the last Sunday on the last row. Anyway to fix it?

    usaman45_0-1656017907694.png

     

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on 05 Apr 2022 at 04:09:58
    Re: Starting day of the week (Sunday to Monday)

    Hi @Anonymous,

    Do you want to change the first day as Monday using the Calendar.WeekdaysShort()?

     

    If you want to achieve this using the Calendar.WeekdaysShort(), I am afraid there is no OOTB in Power Apps. You could directly replace it with [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" ].

     

    Then I will suggest you use the Calendar template within Power Apps, and you should modify something as below:

    There is a small change required to the calculation of the first day in view variable
    
    Set(_dateSelected, Today()); 
    Set(_firstDayOfMonth, DateAdd(Today(), 1 - Day(Today()), Days)); 
    Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 ), Days)); 
    Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, Months), -1, Days))
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on 04 Apr 2022 at 11:52:04
    Re: Starting day of the week (Sunday to Monday)

    https://www.youtube.com/watch?v=SlfnhQgMXrY

     

    https://www.youtube.com/watch?v=8qqEfzdVM0Y

     

    https://www.youtube.com/watch?v=8qqEfzdVM0Y

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    Buy me a coffee!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,771 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started