React-native-calendars: Agenda in IOS - undefined is not an object (evaluating 'days[0].clone')

Created on 2 Sep 2018  路  6Comments  路  Source: wix/react-native-calendars

Agenda is only working in simulator with debug mode.

This error appears when using my iphone in debug mode. And in release mode both simulator and iphone dun work.

Any ideas what is going on?

Most helpful comment

@prancky
Had the same issue, i fixed it by makings sure that i provide the correct date format to the selected props, Format should be YYYY-MM-DD, Any date that you feed to the Agenda components should have this format.

import { Agenda } from 'react-native-calendars';
 ...

<Agenda
  ...
  selected={moment().format("YYYY-MM-DD")} 
  ...   
 />

All 6 comments

Following. How did u fix it?

I had the same issue and the date format should be YYYY-MM-DD to fix the issues, so all the dates you feed into the Calendar component should follow that pattern.

I'm having the same issue, for some reason it works fine while in remote debug mode, but as soon as i turn it off, the same error shows.

I'm having the same issue, for some reason it works fine while in remote debug mode, but as soon as i turn it off, the same error shows.

same for me

I'm having the same issue, for some reason it works fine while in remote debug mode, but as soon as i turn it off, the same error shows.

any solution ?

@prancky
Had the same issue, i fixed it by makings sure that i provide the correct date format to the selected props, Format should be YYYY-MM-DD, Any date that you feed to the Agenda components should have this format.

import { Agenda } from 'react-native-calendars';
 ...

<Agenda
  ...
  selected={moment().format("YYYY-MM-DD")} 
  ...   
 />
Was this page helpful?
0 / 5 - 0 ratings