cant get any display??
See original GitHub issueI’m attempting to integrate this into my app but I cannot get any visuals and I’m really not sure what I’m doing wrong.
I’m not sure if this is an actual issue with the code or an issue with the documentation (though I strongly suspect the former). I have an array of 170 objects, I specify the startAccessor and endAccessor properties to correspond to the date properties of the objects, and I get nothing.
To clarify, I see the controls for the calendar, I have the css imported, but there is no grid for the month view let alone any actual data displaying. Here is my render code:
<BigCalendar events={this.state.events} endAccessor='time_started' startAccessor='time_ended' />
I have this placed directly beneath my import statement
BigCalendar.setLocalizer( BigCalendar.momentLocalizer(moment) );
When the time_started and time_ended properties are moment objects, I get a console error upon selecting “week” (but not on render):
TypeError: date[("get" + method)] is not a function
When the time_started/time_ended properties are formatted date strings (“YYYY-MM-DDTHH:MM:SS”) I get no errors. Neither of these provide any display. I’m not sure what to do so I’m hoping I can get some direction, even if this technically isn’t an “issue”. Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Yes you need to set the height of the calendar explicitly (per the documentation). Unfortunately it can’t be done automatically. In addition your start and end dates need to be Date objects not string. You can preprocess your events array or use a function for start and end accessors to do it on the fly
oooooooooooh okay! thank you so much for your help