| 1 |
<!DOCTYPE html> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta charset='utf-8' /> |
| 5 |
<link href='../../dist/fullcalendar.css' rel='stylesheet' /> |
| 6 |
<script src='../../dist/fullcalendar.js'></script> |
| 7 |
<script> |
| 8 |
|
| 9 |
document.addEventListener('DOMContentLoaded', function() { |
| 10 |
var calendarEl = document.getElementById('calendar'); |
| 11 |
|
| 12 |
var calendar = new FullCalendar.Calendar(calendarEl, { |
| 13 |
headerToolbar: { |
| 14 |
left: 'prev,next today', |
| 15 |
center: 'title', |
| 16 |
right: 'dayGridMonth,week,day' |
| 17 |
}, |
| 18 |
initialDate: '2018-12-12', |
| 19 |
navLinks: true, // can click day/week names to navigate views |
| 20 |
selectable: true, |
| 21 |
dateClick: function(info) { |
| 22 |
console.log('dateClick', info.dateStr) |
| 23 |
} |
| 24 |
}); |
| 25 |
|
| 26 |
calendar.render(); |
| 27 |
}); |
| 28 |
|
| 29 |
</script> |
| 30 |
<style> |
| 31 |
|
| 32 |
/* |
| 33 |
for |
| 34 |
https://github.com/fullcalendar/fullcalendar/issues/3615 |
| 35 |
*/ |
| 36 |
|
| 37 |
html, body { |
| 38 |
height: 100%; |
| 39 |
} |
| 40 |
|
| 41 |
body { |
| 42 |
border: 1px solid red; |
| 43 |
overflow-x: hidden; |
| 44 |
} |
| 45 |
|
| 46 |
body { |
| 47 |
margin: 0; |
| 48 |
padding: 0; |
| 49 |
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif; |
| 50 |
font-size: 13px; |
| 51 |
} |
| 52 |
|
| 53 |
#calendar { |
| 54 |
width: 900px; |
| 55 |
margin: 40px auto; |
| 56 |
} |
| 57 |
|
| 58 |
</style> |
| 59 |
</head> |
| 60 |
<body> |
| 61 |
|
| 62 |
<div id='calendar'></div> |
| 63 |
|
| 64 |
</body> |
| 65 |
</html> |