Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/380.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 酒店日历';订票系统_Javascript_Fullcalendar_Fullcalendar 5 - Fatal编程技术网

Javascript 酒店日历';订票系统

Javascript 酒店日历';订票系统,javascript,fullcalendar,fullcalendar-5,Javascript,Fullcalendar,Fullcalendar 5,我正在尝试为一家酒店创建一个预订系统。该系统将由酒店管理员使用,而不是由客户使用。 在行上我需要查看房间(100101,ecc..),在列上我需要日期。 我使用的是TimelineView,初始视图设置为“resourceTimelineWeek”。 我可以添加房间并让它工作,但我不需要看一天中的几个小时,只需要看一天。这个房间至少预定了一整天。 这是我的基本代码,我尝试了“allDaySlot”选项,但运气不好 document.addEventListener('DOMContentLoad

我正在尝试为一家酒店创建一个预订系统。该系统将由酒店管理员使用,而不是由客户使用。 在行上我需要查看房间(100101,ecc..),在列上我需要日期。 我使用的是TimelineView,初始视图设置为“resourceTimelineWeek”。 我可以添加房间并让它工作,但我不需要看一天中的几个小时,只需要看一天。这个房间至少预定了一整天。 这是我的基本代码,我尝试了“allDaySlot”选项,但运气不好

document.addEventListener('DOMContentLoaded', function() {
                    var calendarEl = document.getElementById('calendar');
                    var calendar = new FullCalendar.Calendar(calendarEl, {
                        initialView: 'resourceTimelineWeek',
                        allDaySlot : true,
                        resources: [{
                                id: '1',
                                title: 'Room 101'
                            },
                            {
                                id: '2',
                                title: 'Room 102'
                            }
                        ]
                    });
                    calendar.render();
                });
有什么建议吗?
谢谢

添加
slotDuration:{day:1}

var calendarEl=document.getElementById('calendar');
var calendar=新的完整日历。日历(calendarEl{
initialView:“resourceTimelineWeek”,
是的,
慢速持续时间:{day:1},
资源:[{
id:'1',
标题:“101房间”
},
{
id:'2',
标题:“102房间”
}
]
});
calendar.render()


谢谢您的回复,抱歉耽搁了!我试过没有运气你到底试了什么?结果到底是什么?如果你不明确,我们帮不了你什么忙。你是对的,很抱歉没有完整的回复。我使用了不同的插件。