options.html 3.0 KB

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