I'm trying to modify jquery full calendar's day cell.
Here is a fiddle
I want to edit the css and html in the day cell of the month to show something like this, where the event covers the entire day cell preventing any new dayclick event from occurring. I want max 1 event per day!
I've tried to use the eventRender callback to set some html and css but I haven't had any luck, here is what I tried.
$('#calendar').fullCalendar({
//defaultDate: '2016-12-17',
//defaultView: 'basicWeek',
//height: 300,
//eventColor: 'green',
events: [
{
title: 'event',
start: '2016-12-17T12:00:00',
duration: '60 min'
//rendering: 'background'
}
],
eventRender: function (event, element) {
element.html('');
var new_description =
+ '<div style="text-align: center; height=100%; width=100%;">'
+ moment(event.start._i).format("HH:mm") + '<br/>'
+ event.duration + '<br/>'
+ event.title
+ '</div>'
;
element.append(new_description);
}
});
And here is what is looks like. You'll notice there is some white space on the top where the user can click it and a day event will be triggered and the text isn't center aligned
Quick question - should I avoid fullcalendar and learn react js with the https://github.com/airbnb/react-dates plugin??? It seems like I could have complete control over the html and css for each cell!