Cookforweb
Cookforweb

Reputation: 85

eventDrop programmatically in FullCalendar jquery

I have functional Full Calendar page and I want to move an event on another hour of the day. What I m trying is to use the $.fullCalendar('updateEvent', event); but while the title is changing successfully the new time of the event cannot configured properly (is not changing).

I tried to set the time manually to the event like this:

 var calendar = $('#calendar').fullCalendar('getCalendar');
 event._start = calendar.moment(new Date('2015','04','05','23','00','00'));

or

event._start = $.fullCalendar.moment(new Date('2015','04','05','23','00','00'));

But the event still is on the same position with the time unchanged.

Any ideas?

Upvotes: 1

Views: 563

Answers (1)

valar morghulis
valar morghulis

Reputation: 2017

Try using this fragment for code. Use event.start Instead of event._start

event.start = $.fullCalendar.moment('2014-05-01'); 
//change OR add date and time accordingly 

Upvotes: 1

Related Questions