我这里有一个JSON字符串:
[{"title":"Event","start":"2017-04-23T18:00:00","end":"2017-04-23T18:00:00"},{"title":"Event 2","start":"2017-04-23T11:15:00","end":"2017-04-23T11:15:00"},{"title":"Event 3","start":"2017-04-26T08:32:00","end":"2017-04-26T08:32:00"}]
如何在日历中添加这些事件?(也许使用循环?
试试这个
$('#calendar').fullCalendar({
events: [
{
title : 'event1',
start : '2010-01-01'
},
{
title : 'event2',
start : '2010-01-05',
end : '2010-01-07'
},
{
title : 'event3',
start : '2010-01-09T12:30:00',
allDay : false // will make the time show
}
]
});