full-height.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8' />
  5. <link href='../lib/main.css' rel='stylesheet' />
  6. <script src='../lib/main.js'></script>
  7. <script>
  8. document.addEventListener('DOMContentLoaded', function() {
  9. var calendarEl = document.getElementById('calendar');
  10. var calendar = new FullCalendar.Calendar(calendarEl, {
  11. height: '100%',
  12. expandRows: true,
  13. slotMinTime: '08:00',
  14. slotMaxTime: '20:00',
  15. headerToolbar: {
  16. left: 'prev,next today',
  17. center: 'title',
  18. right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
  19. },
  20. initialView: 'dayGridMonth',
  21. initialDate: '2020-06-12',
  22. navLinks: true, // can click day/week names to navigate views
  23. editable: true,
  24. selectable: true,
  25. nowIndicator: true,
  26. dayMaxEvents: true, // allow "more" link when too many events
  27. events: [
  28. {
  29. title: 'All Day Event',
  30. start: '2020-06-01',
  31. },
  32. {
  33. title: 'Long Event',
  34. start: '2020-06-07',
  35. end: '2020-06-10'
  36. },
  37. {
  38. groupId: 999,
  39. title: 'Repeating Event',
  40. start: '2020-06-09T16:00:00'
  41. },
  42. {
  43. groupId: 999,
  44. title: 'Repeating Event',
  45. start: '2020-06-16T16:00:00'
  46. },
  47. {
  48. title: 'Conference',
  49. start: '2020-06-11',
  50. end: '2020-06-13'
  51. },
  52. {
  53. title: 'Meeting',
  54. start: '2020-06-12T10:30:00',
  55. end: '2020-06-12T12:30:00'
  56. },
  57. {
  58. title: 'Lunch',
  59. start: '2020-06-12T12:00:00'
  60. },
  61. {
  62. title: 'Meeting',
  63. start: '2020-06-12T14:30:00'
  64. },
  65. {
  66. title: 'Happy Hour',
  67. start: '2020-06-12T17:30:00'
  68. },
  69. {
  70. title: 'Dinner',
  71. start: '2020-06-12T20:00:00'
  72. },
  73. {
  74. title: 'Birthday Party',
  75. start: '2020-06-13T07:00:00'
  76. },
  77. {
  78. title: 'Click for Google',
  79. url: 'http://google.com/',
  80. start: '2020-06-28'
  81. }
  82. ]
  83. });
  84. calendar.render();
  85. });
  86. </script>
  87. <style>
  88. html, body {
  89. overflow: hidden; /* don't do scrollbars */
  90. font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
  91. font-size: 14px;
  92. }
  93. #calendar-container {
  94. position: fixed;
  95. top: 0;
  96. left: 0;
  97. right: 0;
  98. bottom: 0;
  99. }
  100. .fc-header-toolbar {
  101. /*
  102. the calendar will be butting up against the edges,
  103. but let's scoot in the header's buttons
  104. */
  105. padding-top: 1em;
  106. padding-left: 1em;
  107. padding-right: 1em;
  108. }
  109. </style>
  110. </head>
  111. <body>
  112. <div id='calendar-container'>
  113. <div id='calendar'></div>
  114. </div>
  115. </body>
  116. </html>