Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FullCalendar: How to show full day names in month view instead of default dayNamesShort?

Tags:

fullcalendar

The default month view display of FullCalendar shows the short version of day names.

I have been trying to find out how to change the display to show full day names. I have read the documentation about dayNames and dayNamesShort, but I can't get it to work.

Any help in how to display the full day names will be appreciated.

Thanks.

like image 962
Legio X Avatar asked Apr 30 '10 23:04

Legio X


3 Answers

Here's how to do it. The magic is done via columnFormat option.

        $('#calendar').fullCalendar({
            header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month,agendaWeek,agendaDay'
            },

            timeFormat: {
                // for agendaWeek and agendaDay do not display time in title (time already displayed in the view)
                agenda: '',

                // for all other views (19p)
                '': 'H:mm{ - H:mm}'
            },

            // *** use long day names by using 'dddd' ***
            columnFormat: {
                month: 'dddd',    // Monday, Wednesday, etc
                week: 'dddd, MMM dS', // Monday 9/7
                day: 'dddd, MMM dS'  // Monday 9/7
            },

            axisFormat: 'H:mm',
            firstHour: 6
        });
    });
like image 93
arcamax Avatar answered Sep 20 '22 14:09

arcamax


I was able to modify the names by doing the following

$(document).ready(function() {

    $('#calendar').fullCalendar({
        dayNamesShort: ['S', 'M', 'T', 'W', 'T', 'F', 'S']
    });

});
like image 21
Richard Blyth Avatar answered Sep 18 '22 14:09

Richard Blyth


Change the month view display to show full day names by setting:

columnFormat: {
   month: 'dddd'
}
like image 37
Jens A. Koch Avatar answered Sep 21 '22 14:09

Jens A. Koch