bootstrap4.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8' />
  5. <link href='../../dist/fullcalendar.css' rel='stylesheet' />
  6. <script src='../../node_modules/moment/moment.js'></script>
  7. <script src='../../node_modules/jquery/dist/jquery.js'></script>
  8. <script src='../../dist/fullcalendar.js'></script>
  9. <!-- using CDN for Bootstrap4 as the project currently depends on Bootstrap 3 -->
  10. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
  11. <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
  12. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  13. <script>
  14. $(document).ready(function() {
  15. $('#calendar').fullCalendar({
  16. customButtons: {
  17. myCustomButton: {
  18. text: 'custom!',
  19. bootstrapFontAwesome: 'fa-bell',
  20. click: function() {
  21. alert('clicked the custom button!');
  22. }
  23. }
  24. },
  25. header: {
  26. left: 'prevYear,prev,today,next,nextYear',
  27. center: 'title',
  28. right: 'myCustomButton dayGridMonth,week,day'
  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. // bootstrapFontAwesome: false,
  40. defaultDate: '2014-08-12',
  41. editable: true,
  42. eventLimit: true, // allow "more" link when too many events
  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. });
  101. </script>
  102. <style>
  103. body {
  104. margin: 40px 10px;
  105. padding: 0;
  106. font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
  107. font-size: 14px;
  108. }
  109. #calendar {
  110. max-width: 900px;
  111. margin: 0 auto;
  112. }
  113. </style>
  114. </head>
  115. <body>
  116. <div id='calendar'></div>
  117. </body>
  118. </html>