react-native-add-calendar-event icon indicating copy to clipboard operation
react-native-add-calendar-event copied to clipboard

Calendar UI is not opening on Android

Open vishaljadhav opened this issue 5 years ago • 2 comments

Below is the source code I have used in my project, functionality works as expected while in debug mode on android but once it is released nothing happens.

Source Code


        var startDateNew = Moment.utc(getFormattedDate(`${this.props.start_date_timestamp}
        ${this.props.start_time.split(" ")[0]}`, "YYYY-MM-DDTHH:mm:ss.SSS[Z]"));
        const eventConfig = {
        title: this.props.title,
        startDate: startDateNew
        // and other options
        };


        Analytics.trackEvent("Start Date As per YYYY-MM-DDTHH:mm:ss.SSS[Z] " + startDateNew)

        AddCalendarEvent.presentEventCreatingDialog(eventConfig)
            .then((eventInfo: { calendarItemIdentifier: string, eventIdentifier: string }) => {
                Analytics.trackEvent("Calender Success" + JSON.stringify(eventInfo))
            })
            .catch((error: string) => {
                Analytics.trackEvent("Calender Error" + JSON.stringify(error))
            });

Error Logged {"line":343,"column":12139,"sourceURL":"index.android.bundle"}

What could be the problem?

vishaljadhav avatar Jun 20 '19 13:06 vishaljadhav

~@vishaljadhav Did you ever get past this issue?~

Turns out my issue was that I was incorrectly formatting my dates. I changed my date formatting to be

moment.utc(self.startDate).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")

and android is happy

KorvinSzanto avatar Aug 05 '19 18:08 KorvinSzanto

@KorvinSzanto 😍

yairopro avatar Mar 14 '22 12:03 yairopro