Nenhuma descrição

daygrid-views.html 2.4KB

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