仅在某些视图中提示

仅在某些视图中提示

本文介绍了FullCalendar - 仅在某些视图中提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在FullCalendar中,有没有办法避免在monthView中点击某一天时打开事件插入提示?

In FullCalendar, is there a way to avoid opening a event insertion prompt when I click on a day in monthView? What I want to do is a changeview and go to the clicked date, which is working, but the prompt is still opening.

dayClick: function(date, jsEvent, view){
    //This works fine, but open a prompt to add new event
    $("#calendar").fullCalendar('changeView','agendaWeek');
    $("#calendar").fullCalendar('gotoDate',date);
}

感谢您的任何帮助。

推荐答案

似乎,您在select事件回调中显示提示。

Seems, you are showing prompt in "select" event callback.

如果您想为日/周视图处理选择事件而不是月视图,则可以检查当前视图并采取相应措施。

If you want to handle "select" event for day/week view and not for month view, you can check the current view and act accordingly.

if($('#calendar').fullCalendar('getView').type != 'month') {
}

这篇关于FullCalendar - 仅在某些视图中提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 00:58