Skip to content

fix: resolve Chrome date parsing error in location overview#2132

Merged
DonKoko merged 2 commits intomainfrom
fix-location-overview-date-format
Oct 21, 2025
Merged

fix: resolve Chrome date parsing error in location overview#2132
DonKoko merged 2 commits intomainfrom
fix-location-overview-date-format

Conversation

@DonKoko
Copy link
Copy Markdown
Contributor

@DonKoko DonKoko commented Oct 21, 2025

Removed server-side date formatting that was causing Chrome to throw "Invalid time value" error. The DateS component now receives the raw Date object and handles all formatting client-side with proper timezone support.

The issue was double formatting: server formatted createdAt to a string like "21/11/2024, 13:57", then DateS tried to parse it again, which Chrome's stricter Date parser rejected.

Removed server-side date formatting that was causing Chrome to throw
"Invalid time value" error. The DateS component now receives the raw
Date object and handles all formatting client-side with proper
timezone support.

The issue was double formatting: server formatted createdAt to a
string like "21/11/2024, 13:57", then DateS tried to parse it again,
which Chrome's stricter Date parser rejected.
@vercel
Copy link
Copy Markdown

vercel bot commented Oct 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
shelf-docs Ignored Ignored Preview Oct 21, 2025 7:55am

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

Updated test expectations to reflect that dates are no longer formatted
server-side. The loader now returns the raw Date (serialized as ISO
string by Remix), and the DateS component handles formatting
client-side.

Changes:
- Removed expectations for getDateTimeFormat mock calls
- Updated createdAt assertion to expect ISO string format
- Added comments explaining the date serialization behavior
@DonKoko DonKoko merged commit ef6c1c3 into main Oct 21, 2025
6 checks passed
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.

1 participant