I’ve been trying to use the Calendar API to insert a new event into the phone’s default calendar at the press of a button, with data from a database, but I can’t seem to get the createEventAsync to accept the data.
I’ve been using moment to get the date in the correct format (from dd-mm-yyyy to yyyy-mm-dd H:m) and then called toDate() but it still tells me that createEventAsync needs a date object.
I tryied to replicate the code in Snack but it seems to never even execute the createEvent command.
The same exact code throws the “startDate requires a Date” error in my app https://snack.expo.io/@sisthra/test-event-insert