Fullcalendar v2 dayRender用于议程视图和agendaweek [英] Fullcalendar v2 dayRender for agenda view and agendaWeek

查看:450
本文介绍了Fullcalendar v2 dayRender用于议程视图和agendaweek的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这个回调只适用于month,basicWeek和basicDay视图..但我需要这个回调议程周和议程。



你有任何替代或答案dayRender?



我试试这个:

  dayRender:function(date,cell ){
if(date> maxDate){
$(cell).addClass('disabled');
console.log(ok);
}
}

和我的观点

  views:{
agendaSix:{
type:'agenda',
duration:{days:6},
buttonText:'5 day',
},
agendaFive:{
type:'agenda',
duration:{days:5},
buttonText: '4 day'
},
agendaFour:{
type:'agenda',
duration:{days:4},
buttonText:'3 day'
},
},

defaultView:'agendaweek'

非常感谢!

解决方案

对于agendaWeek,只有当allDaySlot设置为true时才会触发dayRender调用。如果您将allDaySlot设置为false,则不会调用dayRender。


In version 2 of Fullcalender I need the dayRender callback, I want to change color of disable day.

This callback only works for month, basicWeek, and basicDay views.. But I need this callback for agendaWeek and agenda.

Do you have any alternative or answers for dayRender ?

I try this :

        dayRender: function(date, cell){
            if (date > maxDate){
                $(cell).addClass('disabled');
                console.log("ok");
            }
        }

and my view

       views: {
          agendaSix: {
              type: 'agenda',
              duration: { days: 6 },
              buttonText: '5 day',
          },
          agendaFive: {
              type: 'agenda',
              duration: { days: 5 },
              buttonText: '4 day'
          },
          agendaFour: {
              type: 'agenda',
              duration: { days: 4 },
              buttonText: '3 day'
          },
      },

      defaultView: 'agendaWeek'

Thank you a lot !

解决方案

For the agendaWeek, the dayRender call only fired if allDaySlot is set to true. If you set allDaySlot false then dayRender will not be called.

这篇关于Fullcalendar v2 dayRender用于议程视图和agendaweek的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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