如何通过全日历中的弹出式菜单添加事件和事件描述 [英] how to add event and event discription via popover in full calendar

查看:97
本文介绍了如何通过全日历中的弹出式菜单添加事件和事件描述的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了完整的日历来显示事件和假期。这些事件是从json文件生成的。如何在前端输入事件(例如)如果用户点击特定的日期,它应该显示一个空的弹出窗口来输入事件的标题和描述。如何实现这一点?



小提琴链接在评论....

解决方案如果我明白描述是事件的内容,那么你可以改变这一行: event.msg

  content:event.title 

在阅读以下评论后进行编辑:



我刚刚在window.load closure中添加了这个闭包。
这是在Firefox中工作,但在Chrome中是半功能的(只是第一行代码)。
在Firefox中,您可以通过其父母跟踪编辑的事件,并将其保存在日期和文本的关联数组中。

  $(document).on('dblclick','.popover-title,.popover-content',function(){
$(this).html('& nbsp;') ;
$(this).attr('contentEditable',true);
});


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 ....

解决方案

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);
    });

这篇关于如何通过全日历中的弹出式菜单添加事件和事件描述的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆