fix(datepicker): support styling for out-of-month days#1682
fix(datepicker): support styling for out-of-month days#1682Shreyasshukla957 wants to merge 2 commits into
Conversation
|
|
@Shreyasshukla957 is attempting to deploy a commit to the Bergside Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe Datepicker days view identifies dates outside the displayed month and applies a configurable ChangesDatepicker outside-day styling
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/ui/src/components/Datepicker/Views/Days.tsx (1)
76-81: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winPreserve selected styling precedence.
isOutsideis merged afterisSelected, so its text color can overridetext-whiteon selected out-of-month days. Move it beforeisSelected(andisDisabled) so selected days stay readable.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/ui/src/components/Datepicker/Views/Days.tsx` around lines 76 - 81, Update the class merge order in the Days view’s date item styling so theme.items.item.outside is applied before theme.items.item.selected and theme.items.item.disabled. Preserve selected styling precedence, ensuring selected out-of-month days retain their readable selected text color.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@packages/ui/src/components/Datepicker/Views/Days.tsx`:
- Around line 76-81: Update the class merge order in the Days view’s date item
styling so theme.items.item.outside is applied before theme.items.item.selected
and theme.items.item.disabled. Preserve selected styling precedence, ensuring
selected out-of-month days retain their readable selected text color.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 28482308-e9fb-4bc2-9939-e9e32aa0962e
📒 Files selected for processing (2)
packages/ui/src/components/Datepicker/Views/Days.tsxpackages/ui/src/components/Datepicker/theme.ts
Summary & Motivation
Right now, the datepicker renders leading and trailing days from adjacent months with the same weight as the current month. This makes the calendar grid hard to read.
This PR adds an
outsidetheme token toDatepickerand dims those out-of-month days by default (text-gray-300 dark:text-gray-500) while keeping them clickable.Related Issues
Closes #1647
Breaking API Changes
No breaking changes. Just added the
outsidekey to the days theme interface.Summary by CodeRabbit