No Description

background-events.html 2.7KB

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. <link href='../packages/timegrid/main.css' rel='stylesheet' />
  8. <link href='../packages/list/main.css' rel='stylesheet' />
  9. <script src='../packages/core/main.js'></script>
  10. <script src='../packages/interaction/main.js'></script>
  11. <script src='../packages/daygrid/main.js'></script>
  12. <script src='../packages/timegrid/main.js'></script>
  13. <script src='../packages/list/main.js'></script>
  14. <script>
  15. document.addEventListener('DOMContentLoaded', function() {
  16. var calendarEl = document.getElementById('calendar');
  17. var calendar = new FullCalendar.Calendar(calendarEl, {
  18. plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list' ],
  19. header: {
  20. left: 'prev,next today',
  21. center: 'title',
  22. right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
  23. },
  24. defaultDate: '2019-08-12',
  25. navLinks: true, // can click day/week names to navigate views
  26. businessHours: true, // display business hours
  27. editable: true,
  28. events: [
  29. {
  30. title: 'Business Lunch',
  31. start: '2019-08-03T13:00:00',
  32. constraint: 'businessHours'
  33. },
  34. {
  35. title: 'Meeting',
  36. start: '2019-08-13T11:00:00',
  37. constraint: 'availableForMeeting', // defined below
  38. color: '#257e4a'
  39. },
  40. {
  41. title: 'Conference',
  42. start: '2019-08-18',
  43. end: '2019-08-20'
  44. },
  45. {
  46. title: 'Party',
  47. start: '2019-08-29T20:00:00'
  48. },
  49. // areas where "Meeting" must be dropped
  50. {
  51. groupId: 'availableForMeeting',
  52. start: '2019-08-11T10:00:00',
  53. end: '2019-08-11T16:00:00',
  54. rendering: 'background'
  55. },
  56. {
  57. groupId: 'availableForMeeting',
  58. start: '2019-08-13T10:00:00',
  59. end: '2019-08-13T16:00:00',
  60. rendering: 'background'
  61. },
  62. // red areas where no events can be dropped
  63. {
  64. start: '2019-08-24',
  65. end: '2019-08-28',
  66. overlap: false,
  67. rendering: 'background',
  68. color: '#ff9f89'
  69. },
  70. {
  71. start: '2019-08-06',
  72. end: '2019-08-08',
  73. overlap: false,
  74. rendering: 'background',
  75. color: '#ff9f89'
  76. }
  77. ]
  78. });
  79. calendar.render();
  80. });
  81. </script>
  82. <style>
  83. body {
  84. margin: 40px 10px;
  85. padding: 0;
  86. font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
  87. font-size: 14px;
  88. }
  89. #calendar {
  90. max-width: 900px;
  91. margin: 0 auto;
  92. }
  93. </style>
  94. </head>
  95. <body>
  96. <div id='calendar'></div>
  97. </body>
  98. </html>