fullcalendar在最小/最大时间内移动事件

时间:2017-03-16 14:32:44

标签: jquery html

我在我的项目fullcalendar时间管理员工中使用。我在agendaView中移动事件时遇到问题。当我设置minTime:' 09:00:00'和maxTime:' 17:00:00'我在minTime上移动事件,我希望事件移到前一天。不幸的是,这没有发生,但使用了24小时的时间

示例:

我的活动:10:00-12:00

超过9:00的活动大约一个小时,我想在前一天的16:00-17:00和第二天的9:00-10:00看到活动。

有谁知道如何修复它?

    <!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="http://code.jquery.com/ui/1.12.0/jquery-ui.min.js" integrity="sha256-eGE6blurk5sHj+rmkfsGYeKyZx3M4bG+ZlFyA7Kns7E=" crossorigin="anonymous"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.css"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.css"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.2.0/fullcalendar.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.2.0/fullcalendar.print.css " media="print">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.16.0/moment.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.2.0/fullcalendar.min.js"></script>
<div id='calendar'></div>

</head>
<body>

    <div id='calendar'></div>

</body>
</html>

<script>
$('#calendar').fullCalendar({
schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
header: {
    left: 'prev,next today',
    center: 'title',
    right: ',month,agendaWeek,agendaDay'
},
defaultView: 'agendaDay',
minTime: '09:00:00',
maxTime: '17:00:00',
editable: true,


events: [
    {
        resourceId: '8',
        title:  'My Event',
        start:  '2017-03-16T10:00:00',
        //duration: '00:20:00',
        end: '2017-03-16T12:00:00',
        allDay: false
    }
]


});
</script>

0 个答案:

没有答案