bootstrap4.html 3.5 KB

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