Няма описание

week-numbers.html 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8' />
  5. <link href='../packages/core/main.css' rel='stylesheet' />
  6. <link href='../packages/daygrid/main.css' rel='stylesheet' />
  7. <link href='../packages/timegrid/main.css' rel='stylesheet' />
  8. <link href='../packages/list/main.css' rel='stylesheet' />
  9. <script src='../packages/core/main.js'></script>
  10. <script src='../packages/interaction/main.js'></script>
  11. <script src='../packages/daygrid/main.js'></script>
  12. <script src='../packages/timegrid/main.js'></script>
  13. <script src='../packages/list/main.js'></script>
  14. <script>
  15. document.addEventListener('DOMContentLoaded', function() {
  16. var calendarEl = document.getElementById('calendar');
  17. var calendar = new FullCalendar.Calendar(calendarEl, {
  18. plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list' ],
  19. header: {
  20. left: 'prev,next today',
  21. center: 'title',
  22. right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
  23. },
  24. defaultDate: '2019-08-12',
  25. navLinks: true, // can click day/week names to navigate views
  26. weekNumbers: true,
  27. weekNumbersWithinDays: true,
  28. weekNumberCalculation: 'ISO',
  29. editable: true,
  30. eventLimit: true, // allow "more" link when too many events
  31. events: [
  32. {
  33. title: 'All Day Event',
  34. start: '2019-08-01'
  35. },
  36. {
  37. title: 'Long Event',
  38. start: '2019-08-07',
  39. end: '2019-08-10'
  40. },
  41. {
  42. groupId: 999,
  43. title: 'Repeating Event',
  44. start: '2019-08-09T16:00:00'
  45. },
  46. {
  47. groupId: 999,
  48. title: 'Repeating Event',
  49. start: '2019-08-16T16:00:00'
  50. },
  51. {
  52. title: 'Conference',
  53. start: '2019-08-11',
  54. end: '2019-08-13'
  55. },
  56. {
  57. title: 'Meeting',
  58. start: '2019-08-12T10:30:00',
  59. end: '2019-08-12T12:30:00'
  60. },
  61. {
  62. title: 'Lunch',
  63. start: '2019-08-12T12:00:00'
  64. },
  65. {
  66. title: 'Meeting',
  67. start: '2019-08-12T14:30:00'
  68. },
  69. {
  70. title: 'Happy Hour',
  71. start: '2019-08-12T17:30:00'
  72. },
  73. {
  74. title: 'Dinner',
  75. start: '2019-08-12T20:00:00'
  76. },
  77. {
  78. title: 'Birthday Party',
  79. start: '2019-08-13T07:00:00'
  80. },
  81. {
  82. title: 'Click for Google',
  83. url: 'http://google.com/',
  84. start: '2019-08-28'
  85. }
  86. ]
  87. });
  88. calendar.render();
  89. });
  90. </script>
  91. <style>
  92. body {
  93. margin: 40px 10px;
  94. padding: 0;
  95. font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
  96. font-size: 14px;
  97. }
  98. #calendar {
  99. max-width: 900px;
  100. margin: 0 auto;
  101. }
  102. </style>
  103. </head>
  104. <body>
  105. <div id='calendar'></div>
  106. </body>
  107. </html>