Prasanth chinja Prasanth chinja - 1 year ago 103
jQuery Question

show multiple days in basic day view in Full Calendar

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}

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

The yellow color should be there only for current Date.

please help, Thanks.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download