在全日历的基本日视图中显示多天 [英] show multiple days in basic day view in Full Calendar

查看:147
本文介绍了在全日历的基本日视图中显示多天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用完整的日历来显示我的新项目,以显示月,周和日期。日事件。在日按钮点击时,我想在basicDay视图中显示当前每个月的每一天。例如从四月一号到四月三十号,一个接一个的事件。



这是我的代码

  var date = new Date(); 
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();

var events_array = [
{
title:'Test1',
start:new Date(2012,10,1),
allDay:false },
{
title:'Test2',
start:new Date(2012,10,2),
allDay:true}
];

'('#calendar')。fullCalendar({
header:{
left:'prev,next today',
center:'title',
right:'month,agendaweek,basicDay'
},
defaultView:'month',
events:events_array,
})。on('click',' .fc-basicDay-button',function(){// code goes here});

如果有任何替代解决方案存在,请提出建议。

我的输出应该是这样的



https://drive.google.com/file/d/0B4nWRJm-JCahVktDaFhXc0c0LUk/view?usp=sharing



黄色应该只存在于当前的日期。



请帮忙,谢谢。 方案

默认情况下,这对于可用视图来说是不可能的。您需要创建一个自定义视图



类似于:

  views:{
agendaTheWholeMonth:{
type:'agenda',
持续时间:{天数:30}
}
}

或者你可以在完全自定义的新视图中工作。您在上面的链接中有更多详细信息。


Im using full calendar for my new project to show month,week & day events. Here on day button click, i want to show every day of the current month in basicDay view. For example from April 1 to April 30 with events one by one.

Here is my code

var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();

var events_array = [
    {
    title: 'Test1',
    start: new Date(2012, 10, 1),
    allDay: false},
{
    title: 'Test2',
    start: new Date(2012, 10, 2),
    allDay: true}
];

$('#calendar').fullCalendar({
    header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek,basicDay'
    },
    defaultView: 'month',
    events: events_array,       
}).on('click', '.fc-basicDay-button', function() { // code goes here });

if any alternative solution is there then please suggest.

My output should be like this

https://drive.google.com/file/d/0B4nWRJm-JCahVktDaFhXc0c0LUk/view?usp=sharing

The yellow color should be there only for current Date.

please help, Thanks.

解决方案

That's not possible with the available views by default. You need to create a Custom View:

Something like:

views: {
        agendaTheWholeMonth: {
            type: 'agenda',
            duration: { days: 30 }
        }
    }

Or you can work in a totally custom new view. You have more details in the link above.

这篇关于在全日历的基本日视图中显示多天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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