bootstrap4.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8' />
  5. <link href='../../bundle/main.css' rel='stylesheet' />
  6. <script src='../../bundle/main.js'></script>
  7. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
  8. <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
  9. <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
  10. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
  11. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  12. <script>
  13. document.addEventListener('DOMContentLoaded', function() {
  14. var calendarEl = document.getElementById('calendar');
  15. var calendar = new FullCalendar.Calendar(calendarEl, {
  16. customButtons: {
  17. myCustomButton: {
  18. text: 'custom!',
  19. bootstrapFontAwesome: 'fa-bell',
  20. click: function() {
  21. alert('clicked the custom button!');
  22. }
  23. }
  24. },
  25. headerToolbar: {
  26. left: 'prevYear,prev,today,next,nextYear',
  27. center: 'title',
  28. right: 'myCustomButton dayGridMonth,timeGridWeek,timeGridDay'
  29. },
  30. themeSystem: 'bootstrap',
  31. bootstrapFontAwesome: {
  32. close: 'fa-times-circle',
  33. prev: 'fa-caret-left',
  34. next: 'fa-caret-right',
  35. prevYear: 'fa-arrow-left',
  36. nextYear: 'fa-arrow-right',
  37. month: 'fa-calendar'
  38. },
  39. initialDate: '2014-08-12',
  40. editable: true,
  41. dayMaxEvents: true, // allow "more" link when too many events
  42. navLinks: true,
  43. events: [
  44. {
  45. title: 'All Day Event',
  46. start: '2014-08-01'
  47. },
  48. {
  49. title: 'Long Event',
  50. start: '2014-08-07',
  51. end: '2014-08-10'
  52. },
  53. {
  54. groupId: 999,
  55. title: 'Repeating Event',
  56. start: '2014-08-09T16:00:00'
  57. },
  58. {
  59. groupId: 999,
  60. title: 'Repeating Event',
  61. start: '2014-08-16T16:00:00'
  62. },
  63. {
  64. title: 'Conference',
  65. start: '2014-08-11',
  66. end: '2014-08-13'
  67. },
  68. {
  69. title: 'Meeting',
  70. start: '2014-08-12T10:30:00',
  71. end: '2014-08-12T12:30:00'
  72. },
  73. {
  74. title: 'Lunch',
  75. start: '2014-08-12T12:00:00'
  76. },
  77. {
  78. title: 'Meeting',
  79. start: '2014-08-12T14:30:00'
  80. },
  81. {
  82. title: 'Happy Hour',
  83. start: '2014-08-12T17:30:00'
  84. },
  85. {
  86. title: 'Dinner',
  87. start: '2014-08-12T20:00:00'
  88. },
  89. {
  90. title: 'Birthday Party',
  91. start: '2014-08-13T07:00:00'
  92. },
  93. {
  94. title: 'Click for Google',
  95. url: 'http://google.com/',
  96. start: '2014-08-28'
  97. }
  98. ]
  99. });
  100. calendar.render();
  101. });
  102. </script>
  103. <style>
  104. body {
  105. margin: 40px 10px;
  106. padding: 0;
  107. font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
  108. font-size: 14px;
  109. }
  110. #calendar {
  111. max-width: 1100px;
  112. margin: 0 auto;
  113. }
  114. </style>
  115. </head>
  116. <body>
  117. <div id='calendar'></div>
  118. </body>
  119. </html>