mirror of
https://github.com/usememos/memos.git
synced 2024-11-24 06:35:24 +03:00
fix: incorrect timeline month display (#2792)
Fix incorrect timeline month display
This commit is contained in:
parent
2e0619b4dc
commit
ec4884ea04
@ -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…
Reference in New Issue
Block a user