I am using Responsive Calendar Plug In which I need to dynamically create events.
How can I pass the arr event array as default event list to the plug in.
code is as follow.
Generated Event List is as follow
I am using Responsive Calendar Plug In which I need to dynamically create events.
How can I pass the arr event array as default event list to the plug in.
code is as follow.
Generated Event List is as follow
You are calling JSON.parse
on a a string that isn't really JSON. It's just strings separated by colon. Your string should have the { }
in it so that it will be parsed as a hash.
It should be var str = '{ "2014..." : ... }'
then events : JSON.parse(str)
Try the following:
$(".responsive-calendar").responsiveCalendar({
time: '2013-05',
events: JSON.parse(arr),
});