jquery 完全隐藏:拖动时隐藏事件

x9ybnkn6  于 5个月前  发布在  jQuery
关注(0)|答案(2)|浏览(82)

我有Fullcalendar 3结合了JavaScript插件(我在jquery 1.11和jqueryUI 1.12上运行,尽管我认为jquery版本不相关,因为这些版本在下面的jsFiddle中没有使用)
当我在日历上拖动一个事件时,它就变得不可见。
我希望它保持可见,如Fullcalendar插件本身https://fullcalendar.io/scheduler的示例所示
我做了一个jsfiddle来演示
https://jsfiddle.net/q5t43ga1/
滚动到2019年2月24日上午12点查看活动。
HTML

<div id="calendar"></div>

字符串
JavaScript

$('#calendar').fullCalendar({
    defaultView: 'timelineDay', //agendaWeek
    locale: 'nl',
    timezone: 'local',
    themeSystem: 'bootstrap3',
    height: 200,
    slotDuration: '00:10:00',
    nowIndicator: 'true',
    minTime: "20:00:00", // this makes the calendar start at 8PM
    maxTime: "44:00:00", // this makes the calender end 24 hours later at 8PM ( (8PM => 20) + 24 = 44)
    schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
    editable: true, // enable draggable events
    droppable: true, // this allows things to be dropped onto the calendar
    eventResize: function(event) { // called when an event (already on the calendar) is resized
    },
    events: {
        events: [
            {
            title  : 'event2',
            start  : '2019-02-25',
            end    : '2019-02-27'
            }
        ]
    }
})


见下面随附的图片
Event is visible
When dragging, the event is invisible

iswrvxsc

iswrvxsc1#

@Louys-Patrice-Bessette提供的解决方案对我很有效

.fc-dragging {
    display: block !important;
}

字符串
谢谢你,谢谢

xmq68pz9

xmq68pz92#

对我来说,它是通过设置duration修复的。我使用timelineTenDay

views: {
  timelineTenDay: {
    type: "timeline",
    duration: { days: 2 },
    slotDuration: '00:00',
  },
},

字符串

相关问题