Skip to content

Commit

Permalink
Merge pull request #983 from traPtitech/fix/calendar-rendering
Browse files Browse the repository at this point in the history
fix: いらなくなったイベントを削除するように
  • Loading branch information
mathsuky authored Nov 11, 2024
2 parents 333debd + a8cdb66 commit 391cac6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ export default class CalendarPage extends Vue {
async fetchMonthlyEvents(newDate) {
this.status = 'loading'
const startDate = new Date(newDate.getFullYear(), newDate.getMonth(), 1)
const endDate = new Date(newDate.getFullYear(), newDate.getMonth() + 1, 0)
this.events = []
const startDate = new Date(newDate.getFullYear(), newDate.getMonth() - 1, 1)
const endDate = new Date(newDate.getFullYear(), newDate.getMonth() + 2, 0)
try {
this.events = await api.events.getEvents({
dateBegin: startDate.toISOString(),
Expand Down

0 comments on commit 391cac6

Please sign in to comment.