问题
How i can create repeating events on selected days, for example in monday and tuesday. My event enter code here array data from json:
"title": "Test",
"allDay": false,
"start": "2014-12-11 9:30:00",
"end": "2014-12-11 13:00:00",
"repeat": '1,2,3', // first 3 days of week
How i can do this? I want show only on calendar repeating, becouse repeating is save i database. I must create repeating events on selected days, i have problem with this.
回答1:
You should create your events as different events, with same Id.
From documentation
id String/Integer. Optional
Uniquely identifies the given event. Different instances of repeating events should all have the same id.
So your events should be like:
myevents = [
{
"id":1
"title": "Test",
"allDay": false,
"start": "2014-12-12 9:30:00",
"end": "2014-12-12 13:00:00"
},
{
"id":1
"title": "Test",
"allDay": false,
"start": "2014-12-13 9:30:00",
"end": "2014-12-13 13:00:00"
},
{
"id":1
"title": "Test",
"allDay": false,
"start": "2014-12-14 9:30:00",
"end": "2014-12-14 13:00:00"
}
]
来源:https://stackoverflow.com/questions/27375870/repeat-events-on-selected-days-in-fullcalendar