jQuery FullCalendar不在弹出窗口中加载 [英] Jquery FullCalendar not loading in popup

查看:117
本文介绍了jQuery FullCalendar不在弹出窗口中加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用自定义的css和js show hide函数创建了一个弹出窗口.现在,我想将日历放置到该弹出窗口中.

I created a popup with my custom css and js show hide functions. Now I want to place the calendar to that popup.

我尝试过

$(document).on('click', '.cliker', function () {
   $(".succes_msg").remove();
    $show = $(this).attr('pkid');
    $(this).addClass('activer');
    $("input[name=startTime]").val($(this).find("span").eq(0).html()).timepicker();
    $(".addbtn").attr('pkId', $show);

    $('#calendar').fullCalendar({

      defaultView: 'basicWeek',
      aspectRatio: 1.5,
      header    : {
        left  : 'prev,next',
        center: 'title',
        right : ''
      },
      dayOfMonthFormat: 'ddd MMM/MM',
      firstDay: 4,
      eventLimit: true,
      render: true,
      height: 250,
      buttonText: {
        today: 'today',
        month: 'month'        },
      eventSources: [{
        url: '{{URL::to(route('get_calender_data'))}}',
        type: 'get',
        data: {cinema: 0}
       }],
    });

    $(".modelPophldr,.editShow").show();
    $(".editShow").animate({'margin-top': '25px'});
});

像在上面一样,我正在显示全日历渲染后的弹出窗口. 如何解决?

Like above there I am showing the popup after the fullcalendar rendering. How to fix it?

编辑...

现在,日历仅带有左右箭头,但未加载日历.当我单击下一步按钮时,它将完美显示带有事件的日历.

Right now the calendar is coming with only right and left arrows, but the calendar is not loaded. When I click on the next button it will show the calendar with events perfectly.

推荐答案

display: none将元素从HTML流程中删除,因此当您的元素变得可见时,您需要调用事件,以了解为什么插件在您工作时会起作用点击箭头

display: none removes the element out of the flow of the HTML so you need to call your event when your element becomes visible that why your plugin is working when you click on arrows

尝试在之后初始化您的插件

try to initialize your plugin after

$(".modelPophldr,.editShow").show();

这篇关于jQuery FullCalendar不在弹出窗口中加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆