jquery-ui-themes.html 2.4 KB

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