Skip to content

Conversation

@RYGRIT
Copy link
Contributor

@RYGRIT RYGRIT commented Feb 11, 2026

this pr:

Video
trends.mp4

Question for Maintainers: I noticed that the native HTML <input type="date"> behavior allows for 6-digit years (e.g., 202612) by default. Should I add max="9999-12-31" to restrict the input to 4-digit years? I'm happy to include that in this PR if you think it's better for the UX.

@vercel
Copy link

vercel bot commented Feb 11, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 11, 2026 1:40pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 11, 2026 1:40pm
npmx-lunaria Ignored Ignored Feb 11, 2026 1:40pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

A new exported constant DATE_INPUT_MAX = '9999-12-31' was added in app/utils/input.ts. In app/components/Package/TrendsChart.vue the metric Select is now bound :disabled="activeMetricState.pending". The startDate and endDate inputs no longer disable during pending and instead receive :max="DATE_INPUT_MAX" to limit entered dates. No public component signatures were changed.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes check ❓ Inconclusive Changes are scoped to fixing the date input issue and adding the max constraint; the Likes select disabled option mentioned in the PR description is not reflected in the code changes provided. Clarify whether the 'add disabled option for Likes select' mentioned in the PR description is included in the code changes or if it was removed during implementation.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The PR description clearly relates to the changeset by mentioning issue #1337 and the Likes select disabled option, which directly correspond to the date input and disabled attribute changes.
Linked Issues check ✅ Passed The PR successfully addresses issue #1337 by removing the disabled state from date inputs during pending, allowing year input to complete. DATE_INPUT_MAX prevents 6-digit year entry as recommended.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@danielroe danielroe changed the title fix(trends): prevent date input from being disabled while typing fix: prevent trends date input from being disabled while typing Feb 11, 2026
@danielroe
Copy link
Member

I think restricting to 4-digit years would be safe 😆 (and good ux!)

@RYGRIT
Copy link
Contributor Author

RYGRIT commented Feb 11, 2026

Thanks! I'll update the PR right away.

@RYGRIT
Copy link
Contributor Author

RYGRIT commented Feb 11, 2026

done!

# Conflicts:
#	app/components/Package/TrendsChart.vue
@danielroe danielroe added this pull request to the merge queue Feb 11, 2026
Merged via the queue into npmx-dev:main with commit 2e7a455 Feb 11, 2026
17 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.

Date input in Trends cannot accept year input

2 participants