Skip to content

Commit

Permalink
fix:startDateを先月先頭に
Browse files Browse the repository at this point in the history
  • Loading branch information
mathsuky committed Nov 11, 2024
1 parent f15dedb commit 889ef93
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ export default class CalendarPage extends Vue {
async fetchMonthlyEvents(newDate) {
this.status = 'loading'
this.events = []
const startDate = new Date(newDate.getFullYear(), newDate.getMonth(), 1)
const startDate = new Date(newDate.getFullYear(), newDate.getMonth() - 1, 1)
const endDate = new Date(newDate.getFullYear(), newDate.getMonth() + 2, 0)
console.log(startDate)
console.log(endDate)
try {
this.events = await api.events.getEvents({
dateBegin: startDate.toISOString(),
Expand Down

0 comments on commit 889ef93

Please sign in to comment.