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 / Calendar Component - S...
Power Apps
Answered

Calendar Component - Start Weekday Monday - Have to go back and forth?

(1) ShareShare
ReportReport
Posted on by 20

Hi Everyone,

 

I am trying to edit April Dunnams incredible work regarding Desk Reservations to become a Car Reservation service in danish.

Due to that, denmark like to start the week on monday and end on sunday, which is where my problem lies.

 

I have managed to add the following to my code under FirstDayInView after _FirstDayOfMonth

Madsheogh_1-1658354256594.png

This works partly. So whenever i press either backwards or forwards and go back to the current month, it changes the dates back 1 day. 

Whenever i open the app again, it is one day ahead.

Madsheogh_2-1658354303046.png

 

It seems like i am missing a place where it sets the firstdayinview without being "OnSelect" but i can't figure out where.

 

 

Categories:
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Madsheogh 

     

    I think @aprildunnam 's work is top notch!

     

    I am trying to import everything and deploy it to my test site with the deployment Flow, but I am seeing an error in the Flow on my side towards the end of the deployment Flow:

     

     

    Column 'Reserved By' does not exist. It may have been deleted by another user.

     

     

    If I can resolve that, get to also having the working Canvas App, and if I have some time, I will see if I can get to the question you have.

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Madsheogh 

     

    So far upon closer look I still have error in deploying it to SharePoint site. If I have time to check on it and get to canvas app I let you know. 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Madsheogh 

     

    For a new deployment I had some issues, which in case you run into them on a new deployment, I fixed like below:

     

    Patches to Desk Reservation App

     

    I might check again to see if the patches are working.

     

    If I really have it working now, I might be able to get to your question as well about the Formula if I have some time @Madsheogh . In that case I'll let you know what might be the problem with the day selected being one day ahead when you open the app again.

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    Ok @Madsheogh  I'll see if I have some time to give you a more complete answer but maybe as starting point:

     

    poweractivate_0-1658363720617.png

     

    Notice in Component "Calendar", there is btnNextMonth and btnPrevMonth. Maybe you have to modify those too? Also check if you have to also modify it in tmrInitialize OnStart, etc.

     

    I'll see if I have some time to take a closer look at the formula you provided.

     

    Could you specify for clarification where exactly did you place your modified formula?

  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Madsheogh 

     

    Try to put your formula modification of:

     

    Set(_firstDayInView,DateAdd(_firstDayOfMonth,-(Mod(Weekday(_firstDayOfMonth, StartOfWeek.Monday)-2,7)+1),Days))

     

    in all these places inside the Calendar component, replacing the appropriate line of the formula of course:

     

    tmrInitialize,       in the OnTimerStart  property

    btnNextMonth,  in the OnSelect         property

    btnPrevMonth,   in the OnSelect         property

    btnDebugInit,    in the OnSelect         property

     

    Let me know if it worked.

     

    I might update this post with any more places in the app I find where this replacement may need to be done.

    I suspect there are more than the 4 places I initially found of:  tmrInitialize OnTimerStart  and btnNextMonth btnPrevMonth btnDebugInit OnChange - if I find it I might update this post.

     

    -----

     

    I found more, and I might update this post again when I find them:

     

    ddMonth,        in the OnChange         property

    ddYear,            in the OnChange         property

     

    -------

     

    I think those 4 places:

     

    tmrInitialize OnTimerStart  and btnNextMonth btnPrevMonth btnDebugInit OnChange

     

    and 2 more places:

     

    ddMonth, ddYear OnChange

     

    are all of them, for a total of 6 formula replacements.

     

    poweractivate_0-1658365301454.png

    I think that should be all of them,

    but if you find any others make sure to change them there too, and be sure to post of any others you found than the ones I gave.

     

    Check if making the careful formula replacement on all 6 of the above places resolves the issue for you @Madsheogh 

     

     

  • Madsheogh Profile Picture
    20 on at

    I had this exact problem aswell, actually can't remember how i ended up fixing it.

     

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Madsheogh 

     

    In case you ever have to fix it again from a new deployment, I think my fixes when I was making the solution for you, could work.

     

    The fixes can be found here:

     

    Patches to Desk Reservation App

     

    I am also glad the solution I gave worked for you to modify the app to show Monday as the first day of the week.

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard