Skip to content

Commit

Permalink
修正日历视图下未显示day1-9待办问题
Browse files Browse the repository at this point in the history
  • Loading branch information
troilus committed Oct 30, 2024
1 parent d60ddb1 commit b762f78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@
}

// 添加待办事项
const formattedDate = `${year}-${month + 1}-${day}`;
const formattedDate = `${year}-${(month + 1).toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
const todos = todosByDate[formattedDate] || [];
todos.forEach(todo => {
const todoText = document.createElement('div');
Expand Down

0 comments on commit b762f78

Please sign in to comment.