Hi all, hope you're doing well.
PREMISE: I have an issue with my Power App when creating a calendar invite with the V4CalendarPostItem function, where for some users the app errors and reports the dates provided aren't recognised as valid times.
I have a Power App with features to help a user log their holidays. One feature involves sending out a calendar invite on Outlook to all people the user intends to notify about their holiday (so that the recipients know when they're on holiday). Here's a screenshot of the interface with some dates:

For some context, there are two invites that are sent out when the user clicks submit (among other things): one invite is sent out to the user themselves to mark them as away; and another invite is sent out to all their recipients. The code below is used to send an invite to all recipients:
// Send the external calendar invite, stores the event ID as 'external'
Set(
external,
Office365Outlook.V4CalendarPostItem(
varUserCalendarId,
myself.FullName & " - Holiday",
// DateValue(Text(StartDateNew.SelectedDate)),
// DateValue(Text(EndDateNew.SelectedDate + 1)),
DateValue(Text(StartDateNew.SelectedDate, "yyyy-mm-dd")),
DateValue(Text(EndDateNew.SelectedDate + 1, "yyyy-mm-dd")),
"UTC",
{
requiredAttendees: Concat(InviteesNew.SelectedItems.Email, Email, ";"),
responseRequested: false,
isAllDay: true
}
)
);
With the app, I'm able to set a holiday from 25th March 2024 until 28th March 2024, for example, and this creates an item (the bottom of the two items) in my calendar over those dates.

However, there's one user of the app in particular who sent out an invite over the same date range, and they receive the errors below:

Office365Outlook.V4CalendarPostItem failed: {
"status":400,
"message": "String was not recognized as a valid DateTime.\r\nclientRequestId: 0a811417-2c39-46c8-9fce-624dd97ea1b8",
"error": {
"message": "String was not recgonized as a valid DateTime."
},
"source": "office365-eus2.azconn-eus2-003.p.azurewebsites.net"
}
They've also tried the date ranges below but still receive the error (no calendar invites are sent out), whereas I have tried them and don't receive any errors (the calendar invite is also successfully sent out). Here are some dates they've tried:
- 28th May to 31st May
8th July to 12th July
I've had a look at other posts on the forum where others have tried formatting the date to work for both US and UK formats, so I've added a "yyyy-mm-dd" mask to the dates, but the error still persists. There doesn't seem to be anything that suggests the user has US-specific settings on their Outlook account, so I'm not sure what's wrong. This issue doesn't seem to be happening for other users either, which is really weird.
Thanks for taking the time to read this post, I'm happy to provide more details for any questions.