JSFiddle - React, Tailwind, and code Playground
by Mahavirsinh Padhiyar
HTML
<link rel="stylesheet" href="https://dl.dropboxusercontent.com/s/y4enc3buyzz2m3a/fullcalendar.css">
<script src="https://dl.dropboxusercontent.com/s/93dskqt37q1caxr/fullcalendar.min.js"></script>
<div id='calendar'></div>
JavaScript
var $calendar = $('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay'
},
defaultView: 'month',
dayClick: function(date, allDay, jsEvent, view) {
if (!$(jsEvent.target).hasClass('mylink')) {
window.location = 'facebook.com';
}
},
dayRender: function (date, cell) {
var today = new Date();
if (date.getDate() === today.getDate()) {
cell.css("background-color", "red");
cell.html("<a class='mylink' target='_blank' href='http://www.google.com'>Google</a>");
}
}
});