options.html 3.0 KB

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