I'm not sure if this is the best solution, it is more like hacking. The idea is to change the background color to today's row. Thus, you select all rows, because the time interval is 30 minutes, you will get 96 elements. (48 per day) the first 24 you do not need, because it was the day before. You will need elements 25-73 because now these are strings.
I wrote this function that will be called on every dayRender .
function colorToday() { var color = '#EEEEEE'; var fullArray = $('.fc-slats tr .fc-widget-content:nth-child(2)'); var todayArray = fullArray.slice(24, 72); for(var i = 0; i < todayArray.length; i++) { var data = $(todayArray[i]); $(data).css('background', color); } }
And add this to the options:
dayRender: function (element) { colorToday(); }
This is JSFIDDLE As I said, I'm not sure if this is the best solution, but it works. Hope will help you.
finw3
source share