past_future_classNames.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link href='../../dist/fullcalendar.css' rel='stylesheet' />
  5. <link href='../../dist/fullcalendar.print.css' rel='stylesheet' media='print' />
  6. <script src='../../node_modules/jquery/dist/jquery.js'></script>
  7. <script src='../../node_modules/moment/moment.js'></script>
  8. <script src='../../dist/fullcalendar.js'></script>
  9. <script>
  10. $(document).ready(function() {
  11. var date = new Date();
  12. var d = date.getDate();
  13. var m = date.getMonth();
  14. var y = date.getFullYear();
  15. $('#calendar').fullCalendar({
  16. headerToolbar: {
  17. left: 'prev,next today',
  18. center: 'title',
  19. right: 'month,week,dayGridWeek,day,dayGridDay'
  20. },
  21. editable: true,
  22. events: [
  23. {
  24. title: 'All Day Event',
  25. start: new Date(y, m, 1)
  26. },
  27. {
  28. title: 'Long Event',
  29. start: new Date(y, m, d-5),
  30. end: new Date(y, m, d-2)
  31. },
  32. {
  33. groupId: 999,
  34. title: 'Repeating Event',
  35. start: new Date(y, m, d-3, 16, 0),
  36. allDay: false
  37. },
  38. {
  39. groupId: 999,
  40. title: 'Repeating Event',
  41. start: new Date(y, m, d+4, 16, 0),
  42. allDay: false
  43. },
  44. {
  45. title: 'Meeting',
  46. start: new Date(y, m, d, 10, 30),
  47. allDay: false
  48. },
  49. {
  50. title: 'Lunch',
  51. start: new Date(y, m, d, 12, 5),
  52. end: new Date(y, m, d, 14, 43),
  53. allDay: false
  54. },
  55. {
  56. title: 'Birthday Party',
  57. start: new Date(y, m, d+1, 19, 0),
  58. end: new Date(y, m, d+1, 22, 30),
  59. allDay: false
  60. },
  61. {
  62. title: 'Click for Google',
  63. start: new Date(y, m, 28),
  64. end: new Date(y, m, 29),
  65. url: 'http://google.com/'
  66. }
  67. ]
  68. });
  69. });
  70. </script>
  71. <style>
  72. body {
  73. margin-top: 40px;
  74. text-align: center;
  75. font-size: 13px;
  76. font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
  77. }
  78. #calendar {
  79. width: 900px;
  80. margin: 0 auto;
  81. }
  82. .fc-past {
  83. background: #fbc0fc;
  84. }
  85. .fc-future {
  86. background: #a4ffa4;
  87. }
  88. </style>
  89. </head>
  90. <body>
  91. <div id='calendar'></div>
  92. </body>
  93. </html>