FullCalendar Js选择函数allDay

时间:2017-03-29 15:45:08

标签: javascript fullcalendar

我的select函数定义如下:

    select: function(start,end, callback){
        var allDay = !start.hasTime();
        alert(allDay);

在日历页面上选择日期时,allDay参数设置为true。但是,我不想要这个。有没有办法让allDay上的select设置为false?

我已经定义了所有参数:

    $('#calendar').fullCalendar({
        selectable: true,
        selectHelper: true,
        editable: true,
        eventLimit: true,
        allDay:false, // I really thought this would work...but it doesn't
        ...

但它仍然无效。有什么想法吗?

编辑:

我还尝试在事件中设置allDay

                start = start.format("YYYY-MM-DD");
                end = end.format("YYYY-MM-DD");
                start = start + "T" + startTime;
                end = end + "T" + endTime;

                var event={title: name, start: start, end:end, description: description, allDayDefault: false};

1 个答案:

答案 0 :(得分:0)

您可以使用allDay事件对象上的默认值设置为allDayDefault: false。默认情况下,未定义:

allDayDefault: false

更多信息: https://fullcalendar.io/docs/event_data/allDayDefault/

相关问题