Skip to content

fix: replace hardcoded "March" date with dynamic current date#13

Closed
Malaybhai11 wants to merge 1 commit into
MistryVishwa:mainfrom
Malaybhai11:fix/planner-hardcoded-month
Closed

fix: replace hardcoded "March" date with dynamic current date#13
Malaybhai11 wants to merge 1 commit into
MistryVishwa:mainfrom
Malaybhai11:fix/planner-hardcoded-month

Conversation

@Malaybhai11

Copy link
Copy Markdown

Summary

The planner page and study planner component displayed a hardcoded March {day}, 2026 instead of the actual current date. This caused the date header to always show March regardless of the real date.

Changes

  • app/(dashboard)/planner/page.tsx (lines 698, 866): Replaced March {selectedDay}, 2026 with {currentDate.toLocaleString("default", { month: "long" })} {selectedDay}, {currentDate.getFullYear()}
  • components/dashboard/study-planner.tsx (line 52): Replaced hardcoded March 11, 2026 with {new Date().toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric" })}

The currentDate variable (new Date()) already existed in planner/page.tsx but was unused in the task schedule headers. In study-planner.tsx, we create a fresh Date() inline since it has no state.

Testing

  1. Navigate to /planner
  2. Verify the task schedule header shows the current month and year (e.g., "June 14, 2026") instead of "March"
  3. Verify the study planner subtitle also shows the current date

Fixes #11

The planner page and study planner component displayed a hardcoded
'March {day}, 2026' instead of the actual current date. This caused
the date header to always show March regardless of the real date.

- planner/page.tsx: Use currentDate.toLocaleString() for dynamic month
  and currentDate.getFullYear() for the year (lines 698, 866)
- study-planner.tsx: Use new Date().toLocaleDateString() for the
  subtitle date (line 52)

Fixes MistryVishwa#11
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

@Malaybhai11 is attempting to deploy a commit to the vishwamistrylearning-1037's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Planner page hardcodes "March" instead of using current month

2 participants