Reputation: 4552
Can someone give me advice for below functionality is possible with jquery full calendar.
Once we drop a external event in to a date block, is it possible to extant the event by using a external date picker?
Eg:
Upvotes: 0
Views: 1316
Reputation: 1581
I would utilize eventClick method to open a jquery ui dialog that contains a single text input with datepicker called on it. Utilizing the onSelect method of the datepicker you can update the start and end values of the event object passed to eventClick method. Then you can call the updateEvent method of fullcalendar passing it the same updated event.
eventClick: function(event){
var input = $('<input type="text" id="datepicker" />');
var $dialog = $('<div/>').dialog({autoOpen:true, modal:true});
$dialog.append(input);
$('#datepicker').datepicker({onSelect: function(date){
// you'll have to manually format the date value
// into something fullcalendar understands
// I don't remember off the top of my head what
// format onSelect returns to you or what
// fullcalendar requires.
event.start = date;
$calendar.fullCalendar('updateEvent', event);
}});
}
Upvotes: 1