iPhone Developer
iPhone Developer

Reputation: 469

Adding event to native calendar in react-native iOS is not working

I am trying to add event from my react-native ios app to native calendar. But it does not show any event.

Upvotes: 1

Views: 5158

Answers (1)

adrian
adrian

Reputation: 2923

For anyone else coming to this question who is using the React Native Calendar Events module, there's an issue where if you don't specify an end date when creating an event then it won't work. If you specify endDate in your call to saveEvent, e.g.:

RNCalendarEvents.saveEvent('title', { location: 'location', notes: 'notes', startDate: '2016-10-01T09:45:00.000UTC', endDate: '2016-10-01T10:45:00.000UTC' }

then an event should be created.

Upvotes: 6

Related Questions