fix: replace hardcoded "March" date with dynamic current date#13
Closed
Malaybhai11 wants to merge 1 commit into
Closed
fix: replace hardcoded "March" date with dynamic current date#13Malaybhai11 wants to merge 1 commit into
Malaybhai11 wants to merge 1 commit into
Conversation
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
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The planner page and study planner component displayed a hardcoded
March {day}, 2026instead 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): ReplacedMarch {selectedDay}, 2026with{currentDate.toLocaleString("default", { month: "long" })} {selectedDay}, {currentDate.getFullYear()}components/dashboard/study-planner.tsx(line 52): Replaced hardcodedMarch 11, 2026with{new Date().toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric" })}The
currentDatevariable (new Date()) already existed inplanner/page.tsxbut was unused in the task schedule headers. Instudy-planner.tsx, we create a freshDate()inline since it has no state.Testing
/plannerFixes #11