0
votes

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.

2

2 Answers

1
votes

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.

0
votes

Finally, I got what i expect by creating a new view called agendaList. This view present in old FullCalendar of version 1.6.3.

This link will help you to get what you wanted.