Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在指定的小时范围内启用eventClick_Javascript_Fullcalendar - Fatal编程技术网

Javascript 如何在指定的小时范围内启用eventClick

Javascript 如何在指定的小时范围内启用eventClick,javascript,fullcalendar,Javascript,Fullcalendar,我的应用程序中有FullCalendar jQuery插件,但我需要知道如何在指定的时间范围内启用eventClick(甚至选择)。(如果解决方案在其他时间被禁用,也可以很好) 我的代码: $('#calendarDay').fullCalendar({ dayClick: function(date, jsEvent, view) { if (view.name != 'month') retu

我的应用程序中有FullCalendar jQuery插件,但我需要知道如何在指定的时间范围内启用eventClick(甚至选择)。(如果解决方案在其他时间被禁用,也可以很好)

我的代码:

$('#calendarDay').fullCalendar({

            dayClick: function(date, jsEvent, view) {

                if (view.name != 'month')
                    return;

                if (view.name == 'month') {
                    $('#calendarDay').fullCalendar('changeView', 'agendaDay');
                    $('#calendarDay').fullCalendar('gotoDate', date);
                }

            },

            header: {
                left: 'prev,next today',
                center: 'title',
                right: 'agendaDay, agendaWeek, month'
            },
            defaultView: 'agendaWeek',
            eventLimit: true, 
            selectable: true,
            selectHelper: true,
            eventColor: '#FFA549',
            allDaySlot: false,
            minTime: '07:30:00',
            maxTime: '23:00:00',
            aspectRatio: 2.2,
            height: 'auto',
            businessHours:
            {
                start: '14:30', 
                end: '16:00',
                dow: [ 1, 2, 3, 4, 5 ]
            },

            select: function(start, end) {
                //var title = true;
                var eventData;
                //if (title) {
                    eventData = {
                        title: "Carregamento",
                        start: start,
                        end: end
                    };
                    $('#calendarDay').fullCalendar('renderEvent', eventData, true); // stick? = true
                //}
                $('#calendarDay').fullCalendar('unselect');
            },
            events: [
                {
                    title: 'Carregamento',
                    start: '2016-03-17T16:00:00',
                    end: '2016-03-17T16:30:00'
                }
            ],


        });
适用于我(定义selectConstraint):

selectConstraint:{
              start: '14:30', 
              end: '16:00', 
            },