I would like to open a modal when I click on a calendar day.
script:
<script>
$(document).ready(function ()
{
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,listWeek'
},
views: {
listWeek: { buttonText: 'Compromissos' }
},
defaultView: 'month',
defaultDate: '@(ViewBag.HoraHoje)',
navLinks: false, // can click day/week names to navigate views
editable: false,
eventLimit: false, // allow "more" link when too many event
selectable: true,
dayClick: function(date, jsEvent, view, resourceObj) {
$('#id01').dialog();
}
});
});
</script>
html:
<body>
<div id="calendar"></div>
<div id="id01" class="w3-modal">
<div class="w3-modal-content">
<div class="w3-container">
<p>Some text. Some text. Some text.</p>
<p>Some text. Some text. Some text.</p>
</div>
</div>
</div>