issue_757_removeEvents.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html>
  3. <head>
  4. <script type='text/javascript' src='../src/_loader.js?debug'></script>
  5. <script type='text/javascript'>
  6. $(document).ready(function() {
  7. var date = new Date();
  8. var d = date.getDate();
  9. var m = date.getMonth();
  10. var y = date.getFullYear();
  11. $('#calendar').fullCalendar({
  12. header: {
  13. left: 'prev,next today',
  14. center: 'title',
  15. right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
  16. },
  17. editable: true,
  18. //isRTL: true,
  19. year: 2011,
  20. month: 0,
  21. events: [
  22. {
  23. title: 'All Day Event',
  24. start: new Date(y, m, 1)
  25. },
  26. {
  27. title: 'Long Event',
  28. start: new Date(y, m, d-5),
  29. end: new Date(y, m, d-2)
  30. },
  31. {
  32. id: 999,
  33. title: 'Repeating Event',
  34. start: new Date(y, m, d-3, 16, 0),
  35. allDay: false
  36. },
  37. {
  38. id: 999,
  39. title: 'Repeating Event',
  40. start: new Date(y, m, d+4, 16, 0),
  41. allDay: false
  42. },
  43. {
  44. title: 'Meeting',
  45. start: new Date(y, m, d, 10, 30),
  46. allDay: false
  47. },
  48. {
  49. title: 'Lunch',
  50. start: new Date(y, m, d, 12, 5),
  51. end: new Date(y, m, d, 14, 43),
  52. allDay: false
  53. },
  54. {
  55. title: 'Birthday Party',
  56. start: new Date(y, m, d+1, 19, 0),
  57. end: new Date(y, m, d+1, 22, 30),
  58. allDay: false
  59. },
  60. {
  61. title: 'Click for Google',
  62. start: new Date(y, m, 28),
  63. end: new Date(y, m, 29),
  64. url: 'http://google.com/'
  65. }
  66. ]
  67. });
  68. });
  69. </script>
  70. <style type='text/css'>
  71. body {
  72. margin-top: 40px;
  73. text-align: center;
  74. font-size: 13px;
  75. font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
  76. }
  77. #calendar {
  78. width: 900px;
  79. margin: 0 auto;
  80. }
  81. </style>
  82. </head>
  83. <body>
  84. <button onclick="$('#calendar').fullCalendar('removeEvents')">removeEvents</button>
  85. <button onclick="$('#calendar').fullCalendar('renderEvent', { title:'hey', start:'2011-01-09' }, true)">addEvent (with stick)</button>
  86. <div id='calendar'></div>
  87. </body>
  88. </html>