How to add event and event description via popover in full calendar

社会主义新天地 提交于 2020-01-14 03:29:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!