Skip to content

Commit

Permalink
fix: incorrect timeline month display (#2792)
Browse files Browse the repository at this point in the history
Fix incorrect timeline month display
  • Loading branch information
xwjdsh authored Jan 19, 2024
1 parent 2e0619b commit ec4884e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/components/ActivityCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ec4884e

Please sign in to comment.