options.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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. //defaultView: 'month',
  26. selectable: true,
  27. selectHelper: true,
  28. //weekends: false,
  29. height: 700,
  30. //contentHeight: 500,
  31. //aspectRatio: 2,
  32. header: {
  33. left: 'title',
  34. center: 'month,agendaWeek,basicWeek,agendaDay,basicDay',
  35. right: 'today prevYear,prev,next,nextYear'
  36. },
  37. editable: true,
  38. //disableDragging: true,
  39. //disableResizing: true,
  40. dragOpacity: .5,
  41. //dragOpacity: { agendaWeek: .1 },
  42. dragRevertDuration: 100,
  43. //allDaySlot: false,
  44. allDayText: 'ALLDAY',
  45. firstHour: 10,
  46. slotMinutes: 15,
  47. defaultEventMinutes: 45,
  48. //allDayDefault: false,
  49. /*
  50. titleFormat: {
  51. month: "'hey!'"
  52. },
  53. */
  54. columnFormat: {
  55. month: "dddd"
  56. //agenda: "ddd M/d!!!" // BUG: this wont work. agenda doesn't override our default for 'week'
  57. },
  58. timeFormat: "h(:mm)[T]{ - h(:mm)T}",
  59. //timeFormat: { agendaWeek: "'YO'" },
  60. minTime: 5,
  61. maxTime: '10:45pm',
  62. //dayClick: function(date) {
  63. // console.log(date);
  64. //},
  65. //isRTL: true,
  66. eventColor: 'green',
  67. eventTextColor: 'yellow',
  68. eventBorderColor: 'black',
  69. //eventBackgroundColor: 'red',
  70. events: [
  71. {
  72. title: 'All Day Event',
  73. start: new Date(y, m, 1),
  74. color: 'gray',
  75. //backgroundColor: 'red',
  76. textColor: 'white',
  77. borderColor: '#000'
  78. },
  79. {
  80. title: 'Long Event',
  81. start: new Date(y, m, d-5),
  82. end: new Date(y, m, d-2)
  83. },
  84. {
  85. id: 999,
  86. title: 'Repeating Event',
  87. start: new Date(y, m, d-3, 16, 0),
  88. allDay: false
  89. },
  90. {
  91. id: 999,
  92. title: 'Repeating Event',
  93. start: new Date(y, m, d+4, 16, 0),
  94. allDay: false
  95. },
  96. {
  97. title: 'Meeting',
  98. start: new Date(y, m, d, 10, 30),
  99. allDay: false
  100. },
  101. {
  102. id: 777,
  103. title: 'Lunch',
  104. start: new Date(y, m, d, 12, 0),
  105. end: new Date(y, m, d, 14, 0),
  106. allDay: false
  107. },
  108. {
  109. title: 'Birthday Party',
  110. start: new Date(y, m, d+1, 19, 0),
  111. end: new Date(y, m, d+1, 22, 30),
  112. allDay: false
  113. },
  114. {
  115. title: 'Click for Google',
  116. start: new Date(y, m, 28),
  117. end: new Date(y, m, 29),
  118. url: 'http://google.com/'
  119. }
  120. ]
  121. });
  122. });
  123. </script>
  124. </head>
  125. <body style='font-size:12px'>
  126. <div id='calendar' style='width:70%;margin:20px auto 0;font-family:arial'></div>
  127. </body>
  128. </html>