Keine Beschreibung

list-views.html 2.6KB

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