Can I set a different color for the weekend on monthly fullCalendar display
How does one go about setting the weekend to a di开发者_JAVA技巧fferent color when viewing the monthly or weekly view.
I think that for the case of FullCalendar, you just need to specify some CSS for the existing CSS classes:
.fc-sat { color:blue; }
.fc-sun { color:red; }
I used this to gray-out weekends.
.fc td.fc-sun, .fc td.fc-sat { background-color:#dddddd; }
if we want to color only weekends not friday i tried this .fc-nonbusiness { background-color:white;}
.fc-sat {
background-color: #e4e4e4;
color:
}
.fc-sun {
background-color: #e4e4e4;
}
for full-calendar
Obviously this will depend entirely on your HTML, but assuming you are using a table with class calendar
, with the weekends at the right:
$('table.calendar > tbody > tr > td:nth-child(-n+2)').addClass('weekend');
-n+2
selects the last 2 table cells in each row. weekend
is a class, so in your CSS you'd have something like:
.weekend { color: #00f; }
(If your HTML is different, then update your question with a better description and the code.)
精彩评论