如何在不渲染整个日历的情况下将selectable属性标记为false [英] how to mark selectable property false without rendering the full calendar

查看:98
本文介绍了如何在不渲染整个日历的情况下将selectable属性标记为false的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将全日历的selectable属性标记为在更改特定视图时设置为false.

I want to mark the selectable property for fullcalendar to be set to false on change of particular view.

当前它不起作用.下面是我添加的代码.

Currently its not working. Below is the code I have added.

$("#calendar").fullCalendar('option', 'selectable', false);          
$("#calendar").fullCalendar('changeView', 'timeLineMonthly');

其中timeLineMonthly是为全日历定义的视图.

Where timeLineMonthly is the view defined for fullcalendar.

我不想再次渲染全日历.我只想触发changeView事件,并将selectable选项设置为false.

I don't want to render fullcalendar again. I just want to fire the changeView event and set the selectable option to false.

推荐答案

这可以通过设置特定视图的选项中的> selectable 属性.

This can be done by setting the selectable property in the View-Specific Options.

$('#calendar').fullCalendar({
    views: {
        week: {
            selectable: false
        },
        timeLineMonthly: {
            selectable: true
        }
    }
});

这篇关于如何在不渲染整个日历的情况下将selectable属性标记为false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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