语义UI日历未完全弹出

时间:2019-03-10 15:51:03

标签: javascript ajax bootstrap-modal semantic-ui

我已经实现了语义UI,以便在我的网页上显示日历。单击按钮后,日历应显示在弹出窗口中。我几乎可以正常工作,我唯一的问题是它看起来像这样:https://i.stack.imgur.com/WfB7K.png,但我希望它看起来像这样:https://i.stack.imgur.com/xjX4s.png,而无需单击任何按钮。

我的JS代码:

function devicesForCalendar(type) {

$('#openCalView').click(function () {
    var valueArray = [];

    $('.check:checked').each(function () {
        valueArray.push($(this).val());
    });
    if (valueArray.length == 0) {
        alert("No devices selected!");
        $('#calendarInsert').fullCalendar('destroy');
    }
    else {

        $.ajax({
            url: "db-functions.php",
            method: "POST",
            data: { data: valueArray, change: 'chosenCalendar', type: type },
            success: function (data) {

                var events = JSON.parse(data);

                $('#calendarInsert').fullCalendar('destroy');
                $('#calendarInsert').fullCalendar({
                    header: {
                        left: 'prev,next today',
                        center: 'title',
                        right: 'month,basicWeek,basicDay'
                    },
                    defaultDate: '2019-01-01',
                    navLinks: true, // can click day/week names to navigate views
                    editable: true,
                    eventLimit: true, // allow "more" link when too many events
                    events: events
                });
            }
        });
    }
});

}

0 个答案:

没有答案
相关问题