list-sticky-header.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8' />
  5. <script src='../dist/index.global.js'></script>
  6. <script>
  7. document.addEventListener('DOMContentLoaded', function() {
  8. var calendarEl = document.getElementById('calendar');
  9. var calendar = new FullCalendar.Calendar(calendarEl, {
  10. height: 'auto',
  11. // stickyHeaderDates: false, // for disabling
  12. headerToolbar: {
  13. left: 'prev,next today',
  14. center: 'title',
  15. right: 'listMonth,listYear'
  16. },
  17. // customize the button names,
  18. // otherwise they'd all just say "list"
  19. views: {
  20. listMonth: { buttonText: 'list month' },
  21. listYear: { buttonText: 'list year' }
  22. },
  23. initialView: 'listYear',
  24. initialDate: '2023-01-12',
  25. navLinks: true, // can click day/week names to navigate views
  26. editable: true,
  27. events: [
  28. {
  29. title: 'repeating event 1',
  30. daysOfWeek: [ 1, 2, 3 ],
  31. duration: '00:30'
  32. },
  33. {
  34. title: 'repeating event 2',
  35. daysOfWeek: [ 1, 2, 3 ],
  36. duration: '00:30'
  37. },
  38. {
  39. title: 'repeating event 3',
  40. daysOfWeek: [ 1, 2, 3 ],
  41. duration: '00:30'
  42. }
  43. ]
  44. });
  45. calendar.render();
  46. });
  47. </script>
  48. <style>
  49. body {
  50. margin: 40px 10px;
  51. padding: 0;
  52. font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
  53. font-size: 14px;
  54. }
  55. #calendar {
  56. max-width: 1100px;
  57. margin: 0 auto;
  58. }
  59. </style>
  60. </head>
  61. <body>
  62. <div id='calendar'></div>
  63. </body>
  64. </html>