【问题标题】:how to show event title in fullCalendar with laravel如何使用 laravel 在 fullCalendar 中显示事件标题
【发布时间】:2015-01-25 05:13:12
【问题描述】:

我正在尝试为我的客户平台使用 fullCalendar 插件,但我在活动标题上遇到了一个大问题……日历没有显示!

Here you can see the error page image

这里是我的 JS 代码

$(document).ready(function(){

    $('#calendar').fullCalendar({
        editable: true,
        events: {
            title: 'My Event Title',
            url: '/crud/bussiness/customers/json/{{$id}}',
            color: 'yellow',
            textColor: 'black'
                },
            selectable: true,
            selectHelper: true,
            select: function() {
                 $("#add_booking_modal").trigger("click");
                }
            });
        });

这里是我的带有 JSON 操作的控制器代码

    if( $acc == 'json' ){
        return \CompanyBussiness::getCustomers($id);
    }
//CompanyBussiness is the model where Im declarating the getCustomers method for show the events

我需要修复它,因为我必须在下周展示这个平台。

请有人帮助我。

谢谢!!

【问题讨论】:

    标签: jquery events laravel fullcalendar title


    【解决方案1】:

    你不需要付出

    title: 'My Event Title',
    

    -使用events

    如果您有多个事件,则加载 title 以及 JSON 编码的数组。确保从 JSON 操作加载“标题”。

    如果您有 Chrome 或 Firefox,您可以简单地跟踪它。 请检查

    检查元素 [F12] > '网络' > 选择 XHR 选项

    检查您是否有一个标题作为事件标题传递。一旦你确定它是,那么你就会得到结果。

    谢谢。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多