[英]fullcalendar event title in month view is object Object
when I add event: 当我添加事件时:
var newEvent = new Object();
newEvent.title = "some text";
newEvent.start = new Date();
newEvent.allDay = false;
$('#calendar-holder').fullCalendar( 'renderEvent', newEvent );
in month view I don't see title but object Object 在月视图中,我看不到标题,但对象
I found more info - this is html of event in month view. 我发现了更多信息-这是月份视图中的HTML事件。
<div class="fc-content"><span class="fc-time">object Object</span> <span class="fc-title">dd</span></div>
It's strange, the documentation said that we need to pass the event object argument, so I suggest that you can try with a literal object like this: 奇怪的是,文档说我们需要传递事件对象参数,因此我建议您可以尝试使用这样的文字对象:
var newEvent = {
title: 'some text',
start: new Date(),
allDay: false
};
Note that start time must be a Moment.js convertable string. 请注意,开始时间必须是Moment.js可转换的字符串。 See more:
查看更多:
start: The date/time an event begins.
开始:事件开始的日期/时间。 Required.
需要。 A Moment-ish input, like an ISO8601 string.
瞬间输入,例如ISO8601字符串。 Throughout the API this will become a real Moment object.
在整个API中,这将成为真正的Moment对象。
http://fullcalendar.io/docs/utilities/Moment/ http://fullcalendar.io/docs/utilities/Moment/
For me, it displays "object Object" when the UI configuration has displayEventTime: true
. 对我来说,当UI配置具有
displayEventTime: true
时,它将显示“ object Object”。 Set it to false
. 将其设置为
false
。
displayEventTime: false,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.