list-views.html 2.5 KB

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