list-views.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8' />
  5. <link href='../packages/bundle/main.css' rel='stylesheet' />
  6. <script src='../packages/bundle/main.js'></script>
  7. <script>
  8. document.addEventListener('DOMContentLoaded', function() {
  9. var calendarEl = document.getElementById('calendar');
  10. var calendar = new FullCalendar.Calendar(calendarEl, {
  11. headerToolbar: {
  12. left: 'prev,next today',
  13. center: 'title',
  14. right: 'listDay,listWeek'
  15. },
  16. // customize the button names,
  17. // otherwise they'd all just say "list"
  18. views: {
  19. listDay: { buttonText: 'list day' },
  20. listWeek: { buttonText: 'list week' }
  21. },
  22. initialView: 'listWeek',
  23. initialDate: '2020-09-12',
  24. navLinks: true, // can click day/week names to navigate views
  25. editable: true,
  26. dayMaxEvents: true, // allow "more" link when too many events
  27. events: [
  28. {
  29. title: 'All Day Event',
  30. start: '2020-09-01'
  31. },
  32. {
  33. title: 'Long Event',
  34. start: '2020-09-07',
  35. end: '2020-09-10'
  36. },
  37. {
  38. groupId: 999,
  39. title: 'Repeating Event',
  40. start: '2020-09-09T16:00:00'
  41. },
  42. {
  43. groupId: 999,
  44. title: 'Repeating Event',
  45. start: '2020-09-16T16:00:00'
  46. },
  47. {
  48. title: 'Conference',
  49. start: '2020-09-11',
  50. end: '2020-09-13'
  51. },
  52. {
  53. title: 'Meeting',
  54. start: '2020-09-12T10:30:00',
  55. end: '2020-09-12T12:30:00'
  56. },
  57. {
  58. title: 'Lunch',
  59. start: '2020-09-12T12:00:00'
  60. },
  61. {
  62. title: 'Meeting',
  63. start: '2020-09-12T14:30:00'
  64. },
  65. {
  66. title: 'Happy Hour',
  67. start: '2020-09-12T17:30:00'
  68. },
  69. {
  70. title: 'Dinner',
  71. start: '2020-09-12T20:00:00'
  72. },
  73. {
  74. title: 'Birthday Party',
  75. start: '2020-09-13T07:00:00'
  76. },
  77. {
  78. title: 'Click for Google',
  79. url: 'http://google.com/',
  80. start: '2020-09-28'
  81. }
  82. ]
  83. });
  84. calendar.render();
  85. });
  86. </script>
  87. <style>
  88. body {
  89. margin: 40px 10px;
  90. padding: 0;
  91. font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
  92. font-size: 14px;
  93. }
  94. #calendar {
  95. max-width: 1100px;
  96. margin: 0 auto;
  97. }
  98. </style>
  99. </head>
  100. <body>
  101. <div id='calendar'></div>
  102. </body>
  103. </html>