_issue-6069.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8' />
  5. <link href='../packages-premium/bundle/main.css' rel='stylesheet' />
  6. <script src='../packages-premium/bundle/main.js'></script>
  7. <script>
  8. document.addEventListener('DOMContentLoaded', function() {
  9. var calendarEl = document.getElementById('calendar');
  10. var calendar = new FullCalendar.Calendar(calendarEl, {
  11. timeZone: 'UTC',
  12. initialView: 'timeGridDay',
  13. allDaySlot: false,
  14. headerToolbar: {
  15. left: 'prev,next today',
  16. center: 'title',
  17. right: 'timeGridWeek,timeGridDay'
  18. },
  19. events: 'https://fullcalendar.io/demo-events.json',
  20. selectable: true,
  21. views: {
  22. timeGridDay: {
  23. dayHeaders: false
  24. }
  25. },
  26. height: 'auto', // will activate stickyHeaderDates automatically!
  27. slotDuration: '00:05:00' // very small slots will make the calendar really tall
  28. });
  29. calendar.render();
  30. });
  31. </script>
  32. <style>
  33. body {
  34. margin: 0;
  35. padding: 0;
  36. font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
  37. font-size: 14px;
  38. text-align: center;
  39. }
  40. #calendar {
  41. max-width: 1100px;
  42. margin: 50px auto;
  43. }
  44. </style>
  45. </head>
  46. <body>
  47. <p style='margin-bottom: 5em'>
  48. Demo for sticky header. Also, the bottom scrollbars stick.
  49. </p>
  50. <div id='calendar'></div>
  51. <p style='margin-top: 5em'>
  52. Did you see how the bottom scrollbars stuck?
  53. </p>
  54. </body>
  55. </html>