问题
I have used full calendar for displaying events and holidays. The events are generated from a json file. How to enter the events in the frontend (i.e) If the user click on a particular date , it should show a empty popover to enter the title and description of the event. How to achieve this ?
fiddle link is in the comment ....
回答1:
If I understand the description is the content of the event, then you can change this line:
content: event.msg
to
content: event.title
EDIT after reading the below comments:
I just added this closure in your window.load closure. This is working in Firefox, but in Chrome is half-functional (works just the first line of code). In Firefox, you can track the edited events by the user through its parents and save it in an associative array of dates and text.
$(document).on('dblclick', '.popover-title, .popover-content', function(){
$(this).html(' ');
$(this).attr('contentEditable',true);
});
来源:https://stackoverflow.com/questions/25304626/how-to-add-event-and-event-description-via-popover-in-full-calendar