-
Hello everyone, I am trilled with the add-to-calendar feature, and I have recently forked the repository with the intention to contribute in any possible way. While using this feature on one of my projects, I observed that if I only provide the start date in the YYYY-MM-DD format, which is supposed to create an all-day event, it shows two different dates and times. Specifically, the event starts at 7 PM on the day before the input start date and ends at 7 PM on the input start date. Thanks in advance for any insight you can provide me with! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 7 replies
-
Can you share the full code block? |
Beta Was this translation helpful? Give feedback.
-
Thanks for getting back to me Jens, I removed the fields you mentioned above. Please note that convertToYYYYMMDD(date) is simply converting an existing date format to the one required by add-to-calendar-button. I will include the code to that below as well, but that should be working fine.
------------------------ convertToYYYYMMDD function --------------------- function convertToYYYYMMDD(dateString) { return year + '-' + month + '-' + day; export default convertToYYYYMMDD; |
Beta Was this translation helpful? Give feedback.
-
This should now be fixed with the latest update. One side note: The Teams integration is still highly experimental with a lot of workarounds, since Microsoft is somehow not able to provide a proper interface. Hopefully this will get more robust in the future. For now, all-day events should also work. However, Teams will not directly show them as all-day events, but rather an event from 00:00 to 00:00 of the following day. |
Beta Was this translation helpful? Give feedback.
-
So for me, it doesn't create an event from 00:00 to 00:00 of the following day. Instead it is 7:00 pm the previous day to 7:00 pm on the input date. One work around I found is to make my users aware using an MUI Alert; I did the same for the missing HTML tags. I wonder if this is something we can use in the buttons for users using Microsoft Teams. Additionally, I think that Microsoft365 is not working... I believe that due to security measures unless your app is being authenticated using Microsoft, it will not work. |
Beta Was this translation helpful? Give feedback.
-
They are both America/Chicago. |
Beta Was this translation helpful? Give feedback.
-
Ok, I was able to reproduce it. Somehow the fix is not triggered with the React Wrapper. |
Beta Was this translation helpful? Give feedback.
This should now be fixed with the latest update.
Would be awesome if you could validate this! 😃
One side note: The Teams integration is still highly experimental with a lot of workarounds, since Microsoft is somehow not able to provide a proper interface. Hopefully this will get more robust in the future. For now, all-day events should also work. However, Teams will not directly show them as all-day events, but rather an event from 00:00 to 00:00 of the following day.