Skip to content

Conversation

@Abhinandan-basotra
Copy link

@Abhinandan-basotra Abhinandan-basotra commented Jan 14, 2026

Proposed Changes

The Calendar component was already expecting a setSelectedDate prop internally, but it wasn’t being passed from this Schedule component. I passed setSelectedDate to the Calendar component.
Fixes #15092

  • In Schedule.tsx, I passed a prop 'setSelectedDate' to change the property respectively.

Tagging: @ohcnetwork/care-fe-code-reviewers

Merge Checklist

  • Add specs that demonstrate the bug or test the new feature.
  • Update product documentation.
  • Ensure that UI text is placed in I18n files.
  • Prepare a screenshot or demo video for the changelog entry and attach it to the issue.
  • Request peer reviews.
  • Complete QA on mobile devices.
  • Complete QA on desktop devices.
  • Add or update Playwright tests for related changes

Summary by CodeRabbit

  • New Features
    • Enhanced date selection control in the appointment scheduling calendar for improved user interaction.

✏️ Tip: You can customize this high-level summary in your review settings.

@Abhinandan-basotra Abhinandan-basotra requested review from a team January 14, 2026 14:58
@github-actions
Copy link

⚠️ Merge Checklist Incomplete

Thank you for your contribution! To help us review your PR efficiently, please complete the merge checklist in your PR description.

Your PR will be reviewed once you have marked the appropriate checklist items.

To update the checklist:

  • Change - [ ] to - [x] for completed items
  • Only check items that are relevant to your PR
  • Leave items unchecked if they don't apply

The checklist helps ensure code quality, testing coverage, and documentation are properly addressed.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 14, 2026

Walkthrough

Added the setSelectedDate prop to the Calendar component invocation in ScheduleAppointment, enabling external control of the currently selected date. No changes to rendering logic or data flow.

Changes

Cohort / File(s) Summary
Calendar Component Integration
src/pages/PublicAppointments/Schedule.tsx
Added setSelectedDate prop to Calendar component to enable external control of the currently selected date
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly relates to the PR objective of fixing calendar functionality, specifically the 'today' button behavior by passing setSelectedDate prop.
Description check ✅ Passed PR description follows the template structure with Proposed Changes, issue reference, tagging, and completed merge checklist items.

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

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

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.

❤️ Share

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

@github-actions github-actions bot added the Merge Conflict pull requests with merge conflict label Jan 14, 2026
@github-actions
Copy link

Conflicts have been detected against the base branch. Please merge the base branch into your branch.
cc: @Abhinandan-basotra

See: https://docs.ohc.network/docs/contributing#how-to-resolve-merge-conflicts

@github-actions
Copy link

github-actions bot commented Jan 14, 2026

🚀 Preview Deployment Ready!

🔗 Preview URL: https://pr-15143.care-preview-a7w.pages.dev

📱 Mobile Access:
Scan the QR code below to open the preview on your mobile device.

QR Code


This preview will be automatically updated when you push new commits to this PR.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@package.json`:
- Line 191: The package.json currently includes an unused dependency "wrangler":
"^4.59.1"; remove this entry from the dependencies/devDependencies section so
the PR stays focused and avoids adding unrelated tooling, then run your package
manager's install command (npm/yarn/pnpm) to update lockfiles and ensure CI
passes; reference the "wrangler" entry in package.json when making the change.
📜 Review details

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e8b4530 and c2e4737.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json
🧰 Additional context used
📓 Path-based instructions (3)
package.json

📄 CodeRabbit inference engine (.github/instructions/config-files.instructions.md)

Maintain package.json as the primary dependency and script configuration

Files:

  • package.json
**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Use 2-space indentation

Files:

  • package.json
**/*.{ts,tsx,js,jsx,json,css,scss,html}

📄 CodeRabbit inference engine (AGENTS.md)

Use 2-space indentation

Files:

  • package.json
🧠 Learnings (2)
📓 Common learnings
Learnt from: AdityaJ2305
Repo: ohcnetwork/care_fe PR: 13197
File: src/pages/Facility/settings/observationDefinition/ObservationDefinitionForm.tsx:470-495
Timestamp: 2025-09-16T20:46:59.537Z
Learning: In PR `#13197`, AdityaJ2305 indicated that aria-invalid and ref forwarding improvements for ValueSetSelect components can be deferred to a separate PR, considering them not critical for the current focus/scroll fix implementation.
Learnt from: AdityaJ2305
Repo: ohcnetwork/care_fe PR: 11342
File: src/pages/Facility/settings/devices/components/DeviceForm.tsx:330-336
Timestamp: 2025-03-26T12:19:38.781Z
Learning: The PR objectives have been updated to create a new DatePickerInput component that combines absolute date picking (using native input type="date") and relative date picking capabilities, rather than simply replacing custom date pickers with native inputs. The absolute date picker is implemented using native HTML input elements, while a separate relative date picker is included for selecting dates relative to the current date.
📚 Learning: 2025-11-25T13:51:07.680Z
Learnt from: CR
Repo: ohcnetwork/care_fe PR: 0
File: .github/instructions/config-files.instructions.md:0-0
Timestamp: 2025-11-25T13:51:07.680Z
Learning: Applies to package.json : Maintain `package.json` as the primary dependency and script configuration

Applied to files:

  • package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: deploy-preview

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link
Member

@AdityaJ2305 AdityaJ2305 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Attach issue with PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discard changes to this file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discard changes to this file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@github-actions github-actions bot removed the Merge Conflict pull requests with merge conflict label Jan 14, 2026
@Abhinandan-basotra Abhinandan-basotra force-pushed the fix/#15092_Calendar_Today_button branch from 5bca243 to ee37292 Compare January 14, 2026 18:40
@Abhinandan-basotra Abhinandan-basotra requested a review from a team as a code owner January 14, 2026 18:40
@github-actions github-actions bot added the Type Changes Contains changes in typescript types label Jan 14, 2026
@Abhinandan-basotra Abhinandan-basotra force-pushed the fix/#15092_Calendar_Today_button branch from ee37292 to e598efe Compare January 14, 2026 18:53
@github-actions github-actions bot removed the Type Changes Contains changes in typescript types label Jan 14, 2026
@Abhinandan-basotra Abhinandan-basotra force-pushed the fix/#15092_Calendar_Today_button branch from e598efe to 069801c Compare January 14, 2026 19:02
@rithviknishad
Copy link
Member

@Abhinandan-basotra avoid force pushes unless absolutely necessary.

@Abhinandan-basotra
Copy link
Author

@Abhinandan-basotra avoid force pushes unless absolutely necessary.

This is my first PR. So, I don't have much experience about that. I was getting many conflicts. So, I did this.

The current changes is already present in the latest commit and I'll stick to normal commits/pushes from here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calendar “Today” button does not select or highlight today in 'book-appoinment' page.

4 participants