Hi ,
you can use Power Automate to achieve this goal. I am not sure about your Power Apps experience so I created this step by step instructions.
First create a Power automate Flow.
Set the Run only users connection to "Use this connection"
Add the flow in app
Paste this code in the onVisible property of your Screen
If(IsBlank(_userDomain),
UpdateContext({_showLoading: true});
Set(_userDomain, Right(User().Email, Len(User().Email) - Find("@", User().Email)));
Set(_dateSelected, Today());
Set(_firstDayOfMonth, DateAdd(Today(), 1 - Day(Today()), TimeUnit.Days));
Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), TimeUnit.Days));
Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, TimeUnit.Months), -1, TimeUnit.Days))
);
Set(_calendarVisible, false);
UpdateContext({_showLoading: true});
Set(_minDate, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), TimeUnit.Days));
Set(_maxDate, DateAdd(DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), TimeUnit.Days), 40, TimeUnit.Days));
UpdateContext({_showLoading: false});
Set(_calendarVisible, true);
Set(varCalendarItems, test0008.Run(Text(_minDate, DateTimeFormat.UTC),Text(_maxDate, DateTimeFormat.UTC)).response); // Replace the test0008 with your Flow name
Set(parsedItems, ParseJSON(varCalendarItems));
// Create a collection from the parsed items
ClearCollect(
myCollection,
ForAll(
parsedItems,
{
Subject: Text(ThisRecord.subject),
Start: DateTimeValue(ThisRecord.start),
End: DateTimeValue(ThisRecord.end),
StartWithTimeZone: Text(ThisRecord.startWithTimeZone),
EndWithTimeZone: Text(ThisRecord.endWithTimeZone),
Body: Text(ThisRecord.body),
IsHtml: Boolean(ThisRecord.isHtml),
ResponseType: Text(ThisRecord.responseType),
ResponseTime: DateTimeValue(ThisRecord.responseTime),
Id: Text(ThisRecord.id),
CreatedDateTime: DateTimeValue(ThisRecord.createdDateTime),
LastModifiedDateTime: DateTimeValue(ThisRecord.lastModifiedDateTime),
Organizer: Text(ThisRecord.organizer),
TimeZone: Text(ThisRecord.timeZone),
ICalUId: Text(ThisRecord.iCalUId),
Categories: Text(ThisRecord.categories),
WebLink: Text(ThisRecord.webLink),
Location: Text(ThisRecord.location),
Importance: Text(ThisRecord.importance),
IsAllDay: Boolean(ThisRecord.isAllDay),
Recurrence: Text(ThisRecord.recurrence),
ReminderMinutesBeforeStart: Value(ThisRecord.reminderMinutesBeforeStart),
IsReminderOn: Boolean(ThisRecord.isReminderOn),
ShowAs: Text(ThisRecord.showAs),
ResponseRequested: Boolean(ThisRecord.responseRequested),
Sensitivity: Text(ThisRecord.sensitivity)
}
)
);
Change the Items property of CalendarEventsGallery to
SortByColumns(Filter(myCollection, Text(Start, DateTimeFormat.ShortDate) = Text(_dateSelected, DateTimeFormat.ShortDate)), "Start")
Delete the Dropdown
Change the OnSelect property of the Left arrow to
/*changes month view to previous month*/
Set(_firstDayOfMonth, DateAdd(_firstDayOfMonth, -1, TimeUnit.Months));
Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), TimeUnit.Days));
Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, TimeUnit.Months), -1, TimeUnit.Days));
/*collects calendar events for all days in current month view. Updates _minDate to prevent duplicate data collection if user returns to this month view*/
If(_minDate > _firstDayOfMonth, Set(_minDate, _firstDayOfMonth);
Set(varCalendarItems, test0008.Run(Text(_minDate, DateTimeFormat.UTC),Text(_maxDate, DateTimeFormat.UTC)).response); // Replace the test0008 with your Flow name
Set(parsedItems, ParseJSON(varCalendarItems));
// Create a collection from the parsed items
ClearCollect(
myCollection,
ForAll(
parsedItems,
{
Subject: Text(ThisRecord.subject),
Start: DateTimeValue(ThisRecord.start),
End: DateTimeValue(ThisRecord.end),
StartWithTimeZone: Text(ThisRecord.startWithTimeZone),
EndWithTimeZone: Text(ThisRecord.endWithTimeZone),
Body: Text(ThisRecord.body),
IsHtml: Boolean(ThisRecord.isHtml),
ResponseType: Text(ThisRecord.responseType),
ResponseTime: DateTimeValue(ThisRecord.responseTime),
Id: Text(ThisRecord.id),
CreatedDateTime: DateTimeValue(ThisRecord.createdDateTime),
LastModifiedDateTime: DateTimeValue(ThisRecord.lastModifiedDateTime),
Organizer: Text(ThisRecord.organizer),
TimeZone: Text(ThisRecord.timeZone),
ICalUId: Text(ThisRecord.iCalUId),
Categories: Text(ThisRecord.categories),
WebLink: Text(ThisRecord.webLink),
Location: Text(ThisRecord.location),
Importance: Text(ThisRecord.importance),
IsAllDay: Boolean(ThisRecord.isAllDay),
Recurrence: Text(ThisRecord.recurrence),
ReminderMinutesBeforeStart: Value(ThisRecord.reminderMinutesBeforeStart),
IsReminderOn: Boolean(ThisRecord.isReminderOn),
ShowAs: Text(ThisRecord.showAs),
ResponseRequested: Boolean(ThisRecord.responseRequested),
Sensitivity: Text(ThisRecord.sensitivity)
}
)
);)
Change the OnSelect property of the Right arrow to
/*changes month view to next month*/
Set(_firstDayOfMonth, DateAdd(_firstDayOfMonth, 1, TimeUnit.Months));
Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), TimeUnit.Days));
/*collects calendar events for all days in current month view. Updates _maxDate to prevent duplicate data collection if user returns to this month view*/
Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, TimeUnit.Months), -1, TimeUnit.Days));
If(_lastDayOfMonth > _maxDate, Set(_maxDate, _lastDayOfMonth); Set(varCalendarItems, test0008.Run(Text(_minDate, DateTimeFormat.UTC),Text(_maxDate, DateTimeFormat.UTC)).response); // Replace the test0008 with your Flow name
Set(parsedItems, ParseJSON(varCalendarItems));
// Create a collection from the parsed items
ClearCollect(
myCollection,
ForAll(
parsedItems,
{
Subject: Text(ThisRecord.subject),
Start: DateTimeValue(ThisRecord.start),
End: DateTimeValue(ThisRecord.end),
StartWithTimeZone: Text(ThisRecord.startWithTimeZone),
EndWithTimeZone: Text(ThisRecord.endWithTimeZone),
Body: Text(ThisRecord.body),
IsHtml: Boolean(ThisRecord.isHtml),
ResponseType: Text(ThisRecord.responseType),
ResponseTime: DateTimeValue(ThisRecord.responseTime),
Id: Text(ThisRecord.id),
CreatedDateTime: DateTimeValue(ThisRecord.createdDateTime),
LastModifiedDateTime: DateTimeValue(ThisRecord.lastModifiedDateTime),
Organizer: Text(ThisRecord.organizer),
TimeZone: Text(ThisRecord.timeZone),
ICalUId: Text(ThisRecord.iCalUId),
Categories: Text(ThisRecord.categories),
WebLink: Text(ThisRecord.webLink),
Location: Text(ThisRecord.location),
Importance: Text(ThisRecord.importance),
IsAllDay: Boolean(ThisRecord.isAllDay),
Recurrence: Text(ThisRecord.recurrence),
ReminderMinutesBeforeStart: Value(ThisRecord.reminderMinutesBeforeStart),
IsReminderOn: Boolean(ThisRecord.isReminderOn),
ShowAs: Text(ThisRecord.showAs),
ResponseRequested: Boolean(ThisRecord.responseRequested),
Sensitivity: Text(ThisRecord.sensitivity)
}
)
);)
Change the circle inside the MonthDayGallery to:
CountRows(Filter(myCollection, DateValue(Text(Start)) = DateAdd(_firstDayInView,ThisItem.Value, TimeUnit.Days))) > 0 && !Subcircle2.Visible && Title6.Visible
- Drag and drop the arrow, calendar etc.. to better location.