mirror of
https://github.com/urosran/cally.git
synced 2025-08-26 06:09:40 +00:00
- Fixed an issue with the required date format for the start and end date when fetching the google events
This commit is contained in:
@ -59,13 +59,17 @@ const CalendarSettingsPage = (props: {
|
|||||||
|
|
||||||
fetchGoogleCalendarEvents(
|
fetchGoogleCalendarEvents(
|
||||||
profileData?.googleToken,
|
profileData?.googleToken,
|
||||||
timeMin.toISOString(),
|
timeMin.toISOString().slice(0, -5) + "Z",
|
||||||
timeMax.toISOString(),
|
timeMax.toISOString().slice(0, -5) + "Z",
|
||||||
).then((response) => {
|
).then((response) => {
|
||||||
response?.forEach((item) => createEvent(item));
|
response?.forEach((item) => saveData(item));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
async function saveData(item) {
|
||||||
|
await createEvent(item);
|
||||||
|
}
|
||||||
|
|
||||||
const fetchAndSaveMicrosoftEvents = () => {
|
const fetchAndSaveMicrosoftEvents = () => {
|
||||||
const startDateTime = new Date(new Date().setHours(0, 0, 0, 0));
|
const startDateTime = new Date(new Date().setHours(0, 0, 0, 0));
|
||||||
const endDateTime = new Date(
|
const endDateTime = new Date(
|
||||||
|
Reference in New Issue
Block a user