🐛 Bug: Community calendar events fail to sort on Safari/iOS due to invalid Date format
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start in lib/calendarUtils.ts, where event dates are formatted before being passed to new Date() for sorting. Reproduce the invalid parsing behavior in Safari or iOS, then verify that the Community Calendar events are ordered chronologically across modern browsers.
Written by the indexing model from the issue text.
Description
Describe the bug
The Community Calendar events list is failing to sort chronologically for users on Safari and iOS devices.
Currently, calendarUtils.ts formats dates as YYYY-MM-DD HH:mm:ss (e.g., 2024-10-15 14:30:00) before passing them into new Date() for sorting. This format is not strictly ISO 8601 compliant because it lacks the T separator.
While V8 browsers (Chrome, Edge) are forgiving and parse this correctly, WebKit (Safari/iOS) strictly follows the spec and evaluates new Date('2024-10-15 14:30:00') as NaN. This causes the array .sort() to fail, leaving the events list completely unsorted for Apple users.
Steps To Reproduce
- Open the JSON Schema community/events page on Safari (macOS or any browser on iOS).
- Notice that the upcoming events are not sorted chronologically.
- Open the Safari console and run
new Date('2024-10-15 14:30:00').getTime(). Observe that it returnsNaN.
Expected Behavior
Events should be listed in chronological order across all modern browsers.
Screenshots
No response
Device Information [optional]
- OS:
- Browser:
- version:
Are you working on this issue?
Yes
Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)
Yes
- Dominant language
- HTML
- Stars
- 169
- Forks
- 484
- Avg merge
- 7h 58m
- Merged PRs (30d)
- 6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from json-schema-org/website
-
Status: Triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
json-schema-org/website#2496 · 2 comments ·
-
📝 Documentation dependencies Status: Triage
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
json-schema-org/website#2492 ·
-
🐛 Bug Status: Triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
json-schema-org/website#2488 · 1 reaction ·
-
dependencies Status: Triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
json-schema-org/website#2487 ·
-
🐛 Bug Status: Triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
json-schema-org/website#2482 ·
All issues in json-schema-org/website
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug ready-for-dev
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 92/100