list-views.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. headerToolbar: {
  11. left: 'prev,next today',
  12. center: 'title',
  13. right: 'listDay,listWeek'
  14. },
  15. // customize the button names,
  16. // otherwise they'd all just say "list"
  17. views: {
  18. listDay: { buttonText: 'list day' },
  19. listWeek: { buttonText: 'list week' }
  20. },
  21. initialView: 'listWeek',
  22. initialDate: '2023-01-12',
  23. navLinks: true, // can click day/week names to navigate views
  24. editable: 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. body {
  88. margin: 40px 10px;
  89. padding: 0;
  90. font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
  91. font-size: 14px;
  92. }
  93. #calendar {
  94. max-width: 1100px;
  95. margin: 0 auto;
  96. }
  97. </style>
  98. </head>
  99. <body>
  100. <div id='calendar'></div>
  101. </body>
  102. </html>