mirror of
https://github.com/usememos/memos.git
synced 2025-10-10 06:16:35 +08:00
fix: incorrect timeline month display (#2792)
Fix incorrect timeline month display
This commit is contained in:
parent
2e0619b4dc
commit
ec4884ea04
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ const ActivityCalendar = (props: Props) => {
|
|||
return (
|
||||
<div className={classNames("w-28 h-auto p-0.5 shrink-0 grid grid-cols-7 grid-flow-row gap-1")}>
|
||||
{days.map((day, index) => {
|
||||
const date = getNormalizedDateString(`${year}-${month}-${day}`);
|
||||
const date = getNormalizedDateString(`${year}-${String(month).padStart(2, "0")}-${String(day).padStart(2, "0")}`);
|
||||
const count = data[date] || 0;
|
||||
const isToday = new Date().toDateString() === new Date(date).toDateString();
|
||||
const tooltipText = count ? `${count} memos in ${date}` : date;
|
||||
|
|
Loading…
Add table
Reference in a new issue