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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Calendar Screen - Firs...
Power Apps
Suggested Answer

Calendar Screen - First day of week Saturday and visibility issues

(0) ShareShare
ReportReport
Posted on by
I have managed to edit the Calendar Screen to have the week start on a Saturday (Rail Weeks run Sat to Fri) and hide any days not in that month. However, for some reason when the first of the month falls on a Saturday it still invisibly displays the entire proceeding week dropping the whole calendar down a row which looks extremely odd. 
 
Anyone got a solution for this? I can see it is to do with this piece of code, where if the first day of the month is the Saturday then the weekday becomes 7 and subtracted. But can't figure out how to change it to suit.
 
/*changes month view to next month*/
Set(_firstDayOfMonth, DateAdd(_firstDayOfMonth, 1, TimeUnit.Months));
Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth)), TimeUnit.Days));

 
This is what it looks like when the first of the month is any other day of the week:
 
 
And this is what it looks like when it falls on the Saturday:
 
Categories:
I have the same question (0)
  • Suggested answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 on at
    pls try the below:
     
    Use the Weekday function with an optional second parameter to set the week to start on Saturday. This will align the calculations with your desired week structure. Replace Weekday(_firstDayOfMonth) with Weekday(_firstDayOfMonth, StartOfWeek.Saturday).
    Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth, StartOfWeek.Saturday) - 1), TimeUnit.Days));
     
    Ensure that when you navigate between months (next/previous), the logic to calculate _firstDayOfMonth and _firstDayInView remains consistent with this adjustment. Exampel: when moving to the next month: - Set(_firstDayOfMonth, DateAdd(_firstDayOfMonth, 1, TimeUnit.Months));
    Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth, StartOfWeek.Saturday) - 1), TimeUnit.Days));
     
    For the previous month: - Set(_firstDayOfMonth, DateAdd(_firstDayOfMonth, -1, TimeUnit.Months));
    Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth, StartOfWeek.Saturday) - 1), TimeUnit.Days));
     
    this should work, let me know how it goes for you.
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard