issue_679.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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='../../dist/plugins/google-calendar.js'></script>
  10. <script>
  11. $(document).ready(function() {
  12. var date = new Date();
  13. var d = date.getDate();
  14. var m = date.getMonth();
  15. var y = date.getFullYear();
  16. $('#calendar').fullCalendar({
  17. headerToolbar: {
  18. left: 'prev,next today',
  19. center: 'title',
  20. right: 'month,week,dayGridWeek,day,dayGridDay'
  21. },
  22. editable: true
  23. });
  24. });
  25. function doit() {
  26. var calendar = $('#calendar');
  27. var holidays = FullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic');
  28. var moon = FullCalendar.gcalFeed('http://www.google.com/calendar/feeds/ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com/public/basic');
  29. var australia = FullCalendar.gcalFeed('http://www.google.com/calendar/feeds/en.australian%23holiday%40group.v.calendar.google.com/public/basic');
  30. calendar.fullCalendar('addEventSource', holidays);
  31. calendar.fullCalendar('addEventSource', moon);
  32. calendar.fullCalendar('addEventSource', australia);
  33. }
  34. </script>
  35. <style>
  36. body {
  37. margin-top: 40px;
  38. text-align: center;
  39. font-size: 13px;
  40. font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
  41. }
  42. #calendar {
  43. width: 900px;
  44. margin: 0 auto;
  45. }
  46. </style>
  47. </head>
  48. <body>
  49. <button onclick='doit()'>do it</button>
  50. <div id='calendar'></div>
  51. </body>
  52. </html>