options.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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. var date = new Date();
  11. var d = date.getDate();
  12. var m = date.getMonth();
  13. var y = date.getFullYear();
  14. $(document).ready(function() {
  15. $('#calendar').fullCalendar({
  16. //year: 2011,
  17. //month: 2,
  18. //date: 1,
  19. /*
  20. //previous bug, should NOT be march
  21. year: 2009,
  22. month: 1,
  23. date: 15,
  24. */
  25. //initialView: 'dayGridMonth',
  26. selectable: true,
  27. selectMirror: true,
  28. //weekends: false,
  29. height: 700,
  30. //contentHeight: 500,
  31. //aspectRatio: 2,
  32. headerToolbar: {
  33. left: 'title',
  34. center: 'month,week,dayGridWeek,day,dayGridDay',
  35. right: 'today prevYear,prev,next,nextYear'
  36. },
  37. editable: true,
  38. dragRevertDuration: 100,
  39. //allDaySlot: false,
  40. allDayContent: 'ALLDAY',
  41. firstHour: 10,
  42. slotMinutes: 15,
  43. defaultEventMinutes: 45,
  44. //defaultAllDay: false,
  45. /*
  46. titleFormat: {
  47. month: "'hey!'"
  48. },
  49. */
  50. dayHeaderFormat: {
  51. month: "dddd"
  52. //timeGrid: "ddd M/d!!!" // BUG: this wont work. timeGrid doesn't override our default for 'week'
  53. },
  54. timeFormat: "h(:mm)[T]{ - h(:mm)T}",
  55. //timeFormat: { week: "'YO'" },
  56. slotMinTime: 5,
  57. slotMaxTime: '10:45pm',
  58. //dayClick: function(date) {
  59. // console.log(date);
  60. //},
  61. //direction: 'rtl',
  62. eventColor: 'green',
  63. eventTextColor: 'yellow',
  64. eventBorderColor: 'black',
  65. //eventBackgroundColor: 'red',
  66. events: [
  67. {
  68. title: 'All Day Event',
  69. start: new Date(y, m, 1),
  70. color: 'gray',
  71. //backgroundColor: 'red',
  72. textColor: 'white',
  73. borderColor: '#000'
  74. },
  75. {
  76. title: 'Long Event',
  77. start: new Date(y, m, d-5),
  78. end: new Date(y, m, d-2)
  79. },
  80. {
  81. groupId: 999,
  82. title: 'Repeating Event',
  83. start: new Date(y, m, d-3, 16, 0),
  84. allDay: false
  85. },
  86. {
  87. groupId: 999,
  88. title: 'Repeating Event',
  89. start: new Date(y, m, d+4, 16, 0),
  90. allDay: false
  91. },
  92. {
  93. title: 'Meeting',
  94. start: new Date(y, m, d, 10, 30),
  95. allDay: false
  96. },
  97. {
  98. id: 777,
  99. title: 'Lunch',
  100. start: new Date(y, m, d, 12, 0),
  101. end: new Date(y, m, d, 14, 0),
  102. allDay: false
  103. },
  104. {
  105. title: 'Birthday Party',
  106. start: new Date(y, m, d+1, 19, 0),
  107. end: new Date(y, m, d+1, 22, 30),
  108. allDay: false
  109. },
  110. {
  111. title: 'Click for Google',
  112. start: new Date(y, m, 28),
  113. end: new Date(y, m, 29),
  114. url: 'http://google.com/'
  115. }
  116. ]
  117. });
  118. });
  119. </script>
  120. </head>
  121. <body style='font-size:12px'>
  122. <div id='calendar' style='width:70%;margin:20px auto 0;font-family:arial'></div>
  123. </body>
  124. </html>