full-height.html 2.7 KB

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