Open jnetode opened 11 months ago
I would like this feature too. It can be confusing when it starts to creep into the next working week!
I have added this feature to my own build by adding the following to the end of OnVisible for the Edit Presence and View Any Team screen:
Set(firstDate,DateAdd(Today(), -(Weekday(Today(),StartOfWeek.MondayZero)), TimeUnit.Days ));
This sets the first day as the Monday of the current week. You can find alternate code (e.g. if you want it to be a Tuesday, Wednesday, etc) here: http://powerappsguide.com/blog/post/get-dates-for-the-current-week
Thanks a lot! That looks good. For the cherry in top of the cake, do you know how to set the current day background somehow different, just to show Today on the week days? That would be awesome!
Edit: I gave the day a border, so it helps seeing it. In the Edit Presence and View Any Team screen I have set the BorderWidth of the "lbDate_2": If( Text( ThisItem.date; DateTimeFormat.ShortDate ) = Text( Today(); DateTimeFormat.ShortDate ); 1; 0)
Your code threw up an error for me, so I altered to:
If(Text(ThisItem.date,DateTimeFormat.ShortDate) = Text(Today(),DateTimeFormat.ShortDate),1,0)
Your code threw up an error for me, so I altered to:
If(Text(ThisItem.date,DateTimeFormat.ShortDate) = Text(Today(),DateTimeFormat.ShortDate),1,0)
That is because of regional settings. I cannot understand why on Earth MS does that, but as I understood, they respect the numeric regional settings. So I have to change commas and semi-colons in the code!
@jnetode I poached your code to alter the background color, which in my opinion has better visual impact.
On screen Edit Presence and View Any Team set TemplateFill of myCalendar_1 to:
If(Text(ThisItem.date,DateTimeFormat.ShortDate) = Text(Today(),DateTimeFormat.ShortDate), RGBA(233, 234, 246, 1), RGBA(0, 0, 0, 0) )
UPDATE: You can achieve the same for the team calendar, on the same screen, set TemplateFill of galIndividualCalendar_1 (nested within teamGallery_1) to:
If(Text(ThisItem.date,DateTimeFormat.ShortDate) = Text(Today(),DateTimeFormat.ShortDate), RGBA(233, 234, 246, 1), RGBA(0, 0, 0, 0) )
Hello, would it be possible to make a weekly view for the dates? Now the "My Calender" view starts today and show the next days. Since we strongly organize ourselfes in a weekly manner, it would be very helpfull to have a weekly view, starting always mondays and showing the entire week.
Thanks