sps
sps

Reputation: 80

Full Calendar Customization for particular day

How can I customize full calendar Particular day's color. (For Example, I want to set red as background color for all Friday in a month)

Upvotes: 0

Views: 473

Answers (1)

Krzysztof Kaźmierczak
Krzysztof Kaźmierczak

Reputation: 1434

You can try this:

$(document).ready(function() {
    $('#calendar').fullCalendar({
        header: {
            left: 'prev,next today',
            center: 'title',
        },
        defaultView: 'month',
        dayRender: function ( date, cell) {
        if (moment(date).weekday() == 5) {
            cell.css("background-color", "red");
        }
    },
});
});

https://jsfiddle.net/wke7w839/

Upvotes: 1

Related Questions