background-events.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8' />
  5. <link href='../fullcalendar.min.css' rel='stylesheet' />
  6. <link href='../fullcalendar.print.min.css' rel='stylesheet' media='print' />
  7. <script src='../lib/moment.min.js'></script>
  8. <script src='../lib/jquery.min.js'></script>
  9. <script src='../fullcalendar.min.js'></script>
  10. <script>
  11. $(document).ready(function() {
  12. $('#calendar').fullCalendar({
  13. header: {
  14. left: 'prev,next today',
  15. center: 'title',
  16. right: 'month,agendaWeek,agendaDay,listMonth'
  17. },
  18. defaultDate: '2020-05-12',
  19. navLinks: true, // can click day/week names to navigate views
  20. businessHours: true, // display business hours
  21. editable: true,
  22. events: [
  23. {
  24. title: 'Business Lunch',
  25. start: '2020-05-03T13:00:00',
  26. constraint: 'businessHours'
  27. },
  28. {
  29. title: 'Meeting',
  30. start: '2020-05-13T11:00:00',
  31. constraint: 'availableForMeeting', // defined below
  32. color: '#257e4a'
  33. },
  34. {
  35. title: 'Conference',
  36. start: '2020-05-18',
  37. end: '2020-05-20'
  38. },
  39. {
  40. title: 'Party',
  41. start: '2020-05-29T20:00:00'
  42. },
  43. // areas where "Meeting" must be dropped
  44. {
  45. id: 'availableForMeeting',
  46. start: '2020-05-11T10:00:00',
  47. end: '2020-05-11T16:00:00',
  48. rendering: 'background'
  49. },
  50. {
  51. id: 'availableForMeeting',
  52. start: '2020-05-13T10:00:00',
  53. end: '2020-05-13T16:00:00',
  54. rendering: 'background'
  55. },
  56. // red areas where no events can be dropped
  57. {
  58. start: '2020-05-24',
  59. end: '2020-05-28',
  60. overlap: false,
  61. rendering: 'background',
  62. color: '#ff9f89'
  63. },
  64. {
  65. start: '2020-05-06',
  66. end: '2020-05-08',
  67. overlap: false,
  68. rendering: 'background',
  69. color: '#ff9f89'
  70. }
  71. ]
  72. });
  73. });
  74. </script>
  75. <style>
  76. body {
  77. margin: 40px 10px;
  78. padding: 0;
  79. font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
  80. font-size: 14px;
  81. }
  82. #calendar {
  83. max-width: 900px;
  84. margin: 0 auto;
  85. }
  86. </style>
  87. </head>
  88. <body>
  89. <div id='calendar'></div>
  90. </body>
  91. </html>