touch.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8' />
  5. <link href='../../dist/fullcalendar.css' rel='stylesheet' />
  6. <link href='../../dist/fullcalendar.print.css' rel='stylesheet' media='print' />
  7. <script src='../../node_modules/moment/moment.js'></script>
  8. <script src='../../node_modules/jquery/dist/jquery.js'></script>
  9. <script src='../../dist/fullcalendar.js'></script>
  10. <script>
  11. $(document).ready(function() {
  12. $('#calendar').fullCalendar({
  13. header: {
  14. left: 'prev,next today',
  15. center: 'title',
  16. right: 'month,week,dayGridWeek'
  17. },
  18. height: 500,
  19. selectable: true,
  20. selectMirror: true,
  21. defaultView: 'week',
  22. defaultDate: '2016-01-12',
  23. editable: true,
  24. eventLimit: true, // allow "more" link when too many events
  25. events: [
  26. {
  27. title: 'All Day Event',
  28. start: '2016-01-01'
  29. },
  30. {
  31. title: 'Long Event',
  32. start: '2016-01-07',
  33. end: '2016-01-10'
  34. },
  35. {
  36. groupId: 999,
  37. title: 'Repeating Event',
  38. start: '2016-01-09T16:00:00'
  39. },
  40. {
  41. groupId: 999,
  42. title: 'Repeating Event',
  43. start: '2016-01-16T16:00:00'
  44. },
  45. {
  46. title: 'Conference',
  47. start: '2016-01-11',
  48. end: '2016-01-13'
  49. },
  50. {
  51. title: 'Meeting',
  52. start: '2016-01-12T10:30:00',
  53. end: '2016-01-12T12:30:00'
  54. },
  55. {
  56. title: 'Lunch',
  57. start: '2016-01-12T12:00:00'
  58. },
  59. {
  60. title: 'Meeting',
  61. start: '2016-01-12T14:30:00'
  62. },
  63. {
  64. title: 'Happy Hour',
  65. start: '2016-01-12T17:30:00'
  66. },
  67. {
  68. title: 'Dinner',
  69. start: '2016-01-12T20:00:00'
  70. },
  71. {
  72. title: 'Birthday Party',
  73. start: '2016-01-13T07:00:00',
  74. end: '2016-01-14T07:00:00'
  75. },
  76. {
  77. title: 'Click for Google',
  78. url: 'http://google.com/',
  79. start: '2016-01-28'
  80. }
  81. ]
  82. });
  83. $(document)
  84. .on('touchstart', function() {
  85. console.log('touchstart');
  86. })
  87. .on('touchend', function() {
  88. console.log('touchend');
  89. })
  90. .on('mousemove', function() {
  91. console.log('mousemove');
  92. })
  93. .on('mousedown', function() {
  94. console.log('mousedown');
  95. })
  96. .on('mouseup', function() {
  97. console.log('mouseup');
  98. })
  99. .on('click', function() {
  100. console.log('click');
  101. });
  102. });
  103. </script>
  104. <style>
  105. body {
  106. margin: 0;
  107. padding: 0;
  108. font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
  109. font-size: 13px;
  110. }
  111. #calendar {
  112. width: 900px;
  113. margin: 40px auto;
  114. }
  115. </style>
  116. </head>
  117. <body>
  118. <div id='calendar'></div>
  119. </body>
  120. </html>