cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Impactful Individual
Impactful Individual

Calendar Screen template : Why 41 days ??

Hello,

I'm applying Calendar screen template to my app.

To convert single calendar into multiple month (Gallery-subGallery), I read document below;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/screen-templates/calendar-screen-refere...

 

In this docs, _maxDate, which is one of query parameters to get calendar event from Outlook, is given by formula as _firstDayInView + 40. and also "the calendar displays a maximum of 41 days"

However, Count Rows of Items property of that gallery is 42! it means the calendar can displays a 42 days maximum. If so, _maxDate should given by _firstDayInView + 41

What was I missing??

 

Thanks,

Hiro

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Calendar Screen template : Why 41 days ??

Hi @h-nagao ,

Please note that the range of dates has many situations.

And there is a special one:

The set of 0 through 41 is used for the items in the calendar gallery because, in the worst-case scenario, the calendar view will have to display 42 full days. This occurs when the first of the month occurs on a Saturday and the last of the month occurs on a Sunday. In this case, the calendar shows six days from the previous month in the row containing the first of the month, and six days from the following month in the row containing the last of the month. This is 42 unique values, of which 30 are for the selected month.

 

The doc that you mentioned has described very detailed, please read the comments blow the code.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Calendar Screen template : Why 41 days ??

Hi @h-nagao ,

Please note that the range of dates has many situations.

And there is a special one:

The set of 0 through 41 is used for the items in the calendar gallery because, in the worst-case scenario, the calendar view will have to display 42 full days. This occurs when the first of the month occurs on a Saturday and the last of the month occurs on a Sunday. In this case, the calendar shows six days from the previous month in the row containing the first of the month, and six days from the following month in the row containing the last of the month. This is 42 unique values, of which 30 are for the selected month.

 

The doc that you mentioned has described very detailed, please read the comments blow the code.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Impactful Individual
Impactful Individual

Re: Calendar Screen template : Why 41 days ??

Thanks, @v-yutliu-msft .

I have noted your comment.

I knew, we don't need to care 40/41, since effective items are max 31, but my point here is just consistency among description in Docs, code, and actual # of items in Gallery.

 

Anyway, I will close this post.

 

Thank you very much!

Hiro  

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,883)