Php 如何在单击日期时将事件添加到FullCalendar中的日期

Php 如何在单击日期时将事件添加到FullCalendar中的日期,php,jquery,ajax,fullcalendar,Php,Jquery,Ajax,Fullcalendar,我用的是全日历。目前正在使用拖动选项将事件添加到日期。现在我需要通过单击特定日期来添加事件 有什么选择吗?我在以下文件中找到了此代码: 编辑:dayClick是我相信您正在寻找的内容。我在youtube Utfala课程中找到了以下代码: $(document).on('click','.fc-day',function(){ var date = $(this).attr('data-date'); $.get('index.php?r=events/create',{'date

我用的是全日历。目前正在使用拖动选项将事件添加到日期。现在我需要通过单击特定日期来添加事件

有什么选择吗?

我在以下文件中找到了此代码:


编辑:
dayClick
是我相信您正在寻找的内容。

我在youtube Utfala课程中找到了以下代码:

$(document).on('click','.fc-day',function(){
    var date = $(this).attr('data-date');
   $.get('index.php?r=events/create',{'date':date},function(data){
     $('#modal').modal('show')
        .find('#modalContent')
        .html(data);
    });
     });

这在单击事件时起作用。我需要代码来添加事件,同时单击特定date@sandeep我很抱歉,在我发布它一分钟左右后我意识到了这一点。我已将我的答案更新为
dayClick
。您能显示您到目前为止在问题中的任何代码吗?(使用按钮)。
$(document).on('click','.fc-day',function(){
    var date = $(this).attr('data-date');
   $.get('index.php?r=events/create',{'date':date},function(data){
     $('#modal').modal('show')
        .find('#modalContent')
        .html(data);
    });
     });