bootstrap5.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8' />
  5. <script src='../../packages/core/dist/index.global.js'></script>
  6. <script src='../../packages/interaction/dist/index.global.js'></script>
  7. <script src='../../packages/daygrid/dist/index.global.js'></script>
  8. <script src='../../packages/timegrid/dist/index.global.js'></script>
  9. <script src='../../packages/list/dist/index.global.js'></script>
  10. <script src='../../packages/multimonth/dist/index.global.js'></script>
  11. <script src='../../packages/bootstrap5/dist/index.global.js'></script>
  12. <link href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" rel="stylesheet">
  13. <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
  14. <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
  15. <script>
  16. document.addEventListener('DOMContentLoaded', function() {
  17. var calendarEl = document.getElementById('calendar');
  18. var calendar = new FullCalendar.Calendar(calendarEl, {
  19. customButtons: {
  20. myCustomButton: {
  21. icon: 'bell',
  22. click: function() {
  23. alert('clicked the custom button!');
  24. }
  25. }
  26. },
  27. headerToolbar: {
  28. left: 'prevYear,prev,today,next,nextYear myCustomButton',
  29. center: 'title',
  30. right: 'multiMonthYear,dayGridMonth,timeGridWeek,listMonth'
  31. },
  32. themeSystem: 'bootstrap5',
  33. // buttonIcons: {
  34. // close: 'x-octagon',
  35. // prev: 'arrow-left-circle-fill',
  36. // next: 'arrow-right-circle-fill',
  37. // prevYear: 'arrow-return-left',
  38. // nextYear: 'arrow-return-right'
  39. // },
  40. initialDate: '2014-08-12',
  41. editable: true,
  42. dayMaxEvents: true, // allow "more" link when too many events
  43. navLinks: true,
  44. events: [
  45. {
  46. title: 'All Day Event',
  47. start: '2014-08-01'
  48. },
  49. {
  50. title: 'Long Event',
  51. start: '2014-08-07',
  52. end: '2014-08-10'
  53. },
  54. {
  55. groupId: 999,
  56. title: 'Repeating Event',
  57. start: '2014-08-09T16:00:00'
  58. },
  59. {
  60. groupId: 999,
  61. title: 'Repeating Event',
  62. start: '2014-08-16T16:00:00'
  63. },
  64. {
  65. title: 'Conference',
  66. start: '2014-08-11',
  67. end: '2014-08-13'
  68. },
  69. {
  70. title: 'Meeting',
  71. start: '2014-08-12T10:30:00',
  72. end: '2014-08-12T12:30:00'
  73. },
  74. {
  75. title: 'Lunch',
  76. start: '2014-08-12T12:00:00'
  77. },
  78. {
  79. title: 'Meeting',
  80. start: '2014-08-12T14:30:00'
  81. },
  82. {
  83. title: 'Happy Hour',
  84. start: '2014-08-12T17:30:00'
  85. },
  86. {
  87. title: 'Dinner',
  88. start: '2014-08-12T20:00:00'
  89. },
  90. {
  91. title: 'Birthday Party',
  92. start: '2014-08-13T07:00:00'
  93. },
  94. {
  95. title: 'Click for Google',
  96. url: 'http://google.com/',
  97. start: '2014-08-28'
  98. }
  99. ]
  100. });
  101. calendar.render();
  102. });
  103. </script>
  104. <style>
  105. body {
  106. margin: 40px 10px;
  107. padding: 0;
  108. font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
  109. font-size: 14px;
  110. }
  111. #calendar {
  112. max-width: 1200px;
  113. margin: 0 auto;
  114. }
  115. </style>
  116. </head>
  117. <body>
  118. <div id='calendar'></div>
  119. </body>
  120. </html>