theming.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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/moment/moment.js'></script>
  8. <script src='../dist/fullcalendar.js'></script>
  9. <script src='lib/themeswitcher/jquery.themeswitcher.js'></script>
  10. <script>
  11. function initCalendar() {
  12. $('#calendar').fullCalendar({
  13. theme: true,
  14. header: {
  15. left: 'prev,next today',
  16. center: 'title',
  17. right: 'month,agendaWeek,agendaDay'
  18. },
  19. defaultDate: '2014-08-12',
  20. weekNumbers: true,
  21. editable: true,
  22. eventLimit: true, // allow "more" link when too many events
  23. events: [
  24. {
  25. title: 'All Day Event',
  26. start: '2014-08-01'
  27. },
  28. {
  29. title: 'Long Event',
  30. start: '2014-08-07',
  31. end: '2014-08-10'
  32. },
  33. {
  34. id: 999,
  35. title: 'Repeating Event',
  36. start: '2014-08-09T16:00:00'
  37. },
  38. {
  39. id: 999,
  40. title: 'Repeating Event',
  41. start: '2014-08-16T16:00:00'
  42. },
  43. {
  44. title: 'Conference',
  45. start: '2014-08-11',
  46. end: '2014-08-13'
  47. },
  48. {
  49. title: 'Meeting',
  50. start: '2014-08-12'
  51. },
  52. {
  53. title: 'Lunch',
  54. start: '2014-08-12'
  55. },
  56. {
  57. title: 'Meeting',
  58. start: '2014-08-12'
  59. },
  60. {
  61. title: 'Happy Hour',
  62. start: '2014-08-12'
  63. },
  64. {
  65. title: 'Dinner',
  66. start: '2014-08-12'
  67. },
  68. {
  69. title: 'Birthday Party',
  70. start: '2014-08-13T07:00:00'
  71. },
  72. {
  73. title: 'Click for Google',
  74. url: 'http://google.com/',
  75. start: '2014-08-28'
  76. }
  77. ]
  78. });
  79. }
  80. $(document).ready(function() {
  81. initCalendar();
  82. $('#switcher').themeswitcher({
  83. imgPath: 'lib/themeswitcher/images/',
  84. loadTheme: 'Cupertino',
  85. height: 400,
  86. onSelect: function(theme) {
  87. setTimeout(function() {
  88. $('#calendar').fullCalendar('render');
  89. },1000);
  90. }
  91. });
  92. });
  93. </script>
  94. </head>
  95. <body style='font-size:13px;margin:0'>
  96. <div id="switcher" style='position:absolute;top:5px;left:5px'></div>
  97. <div id='calendar' style='width:900px;margin:50px auto 0;font-family:arial'></div>
  98. </body>
  99. </html>