Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

app-calendar-events.js 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /**
  2. * App Calendar Events
  3. */
  4. 'use strict';
  5. let date = new Date();
  6. let nextDay = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);
  7. // prettier-ignore
  8. let nextMonth = date.getMonth() === 11 ? new Date(date.getFullYear() + 1, 0, 1) : new Date(date.getFullYear(), date.getMonth() + 1, 1);
  9. // prettier-ignore
  10. let prevMonth = date.getMonth() === 11 ? new Date(date.getFullYear() - 1, 0, 1) : new Date(date.getFullYear(), date.getMonth() - 1, 1);
  11. window.events = [
  12. {
  13. id: 1,
  14. url: '',
  15. title: 'Design Review',
  16. start: date,
  17. end: nextDay,
  18. allDay: false,
  19. extendedProps: {
  20. calendar: 'Business'
  21. }
  22. },
  23. {
  24. id: 2,
  25. url: '',
  26. title: 'Meeting With Client',
  27. start: new Date(date.getFullYear(), date.getMonth() + 1, -11),
  28. end: new Date(date.getFullYear(), date.getMonth() + 1, -10),
  29. allDay: true,
  30. extendedProps: {
  31. calendar: 'Business'
  32. }
  33. },
  34. {
  35. id: 3,
  36. url: '',
  37. title: 'Family Trip',
  38. allDay: true,
  39. start: new Date(date.getFullYear(), date.getMonth() + 1, -9),
  40. end: new Date(date.getFullYear(), date.getMonth() + 1, -7),
  41. extendedProps: {
  42. calendar: 'Holiday'
  43. }
  44. },
  45. {
  46. id: 4,
  47. url: '',
  48. title: "Doctor's Appointment",
  49. start: new Date(date.getFullYear(), date.getMonth() + 1, -11),
  50. end: new Date(date.getFullYear(), date.getMonth() + 1, -10),
  51. extendedProps: {
  52. calendar: 'Personal'
  53. }
  54. },
  55. {
  56. id: 5,
  57. url: '',
  58. title: 'Dart Game?',
  59. start: new Date(date.getFullYear(), date.getMonth() + 1, -13),
  60. end: new Date(date.getFullYear(), date.getMonth() + 1, -12),
  61. allDay: true,
  62. extendedProps: {
  63. calendar: 'ETC'
  64. }
  65. },
  66. {
  67. id: 6,
  68. url: '',
  69. title: 'Meditation',
  70. start: new Date(date.getFullYear(), date.getMonth() + 1, -13),
  71. end: new Date(date.getFullYear(), date.getMonth() + 1, -12),
  72. allDay: true,
  73. extendedProps: {
  74. calendar: 'Personal'
  75. }
  76. },
  77. {
  78. id: 7,
  79. url: '',
  80. title: 'Dinner',
  81. start: new Date(date.getFullYear(), date.getMonth() + 1, -13),
  82. end: new Date(date.getFullYear(), date.getMonth() + 1, -12),
  83. extendedProps: {
  84. calendar: 'Family'
  85. }
  86. },
  87. {
  88. id: 8,
  89. url: '',
  90. title: 'Product Review',
  91. start: new Date(date.getFullYear(), date.getMonth() + 1, -13),
  92. end: new Date(date.getFullYear(), date.getMonth() + 1, -12),
  93. allDay: true,
  94. extendedProps: {
  95. calendar: 'Business'
  96. }
  97. },
  98. {
  99. id: 9,
  100. url: '',
  101. title: 'Monthly Meeting',
  102. start: nextMonth,
  103. end: nextMonth,
  104. allDay: true,
  105. extendedProps: {
  106. calendar: 'Business'
  107. }
  108. },
  109. {
  110. id: 10,
  111. url: '',
  112. title: 'Monthly Checkup',
  113. start: prevMonth,
  114. end: prevMonth,
  115. allDay: true,
  116. extendedProps: {
  117. calendar: 'Personal'
  118. }
  119. }
  120. ];