fix: Ensure previous slots do appear if the month search param is removed
Ensure correct fallback to current month when 'month' query param is missing
Updated the query parameter handling logic to properly format the 'date' param as 'YYYY-MM' in case month param is missing. This resolves an issue where previous slots were not appearing.
What does this PR do?
- Fixes #18094 (GitHub issue number)
Mandatory Tasks (DO NOT REMOVE)
- [ ] I have self-reviewed the code (A decent size PR without self-review might be rejected).
- [ ] I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
- [ ] I confirm automated tests are in place that prove my fix is effective or that my feature works.
How should this be tested?
- Navigate to an Event Page: Open a public page for any event.
- Select a Date: Choose a date from the middle or end of the month [Ensure there exists dates prior to the date you select for this scenario].
- Modify the URL: Copy the page URL and manually remove the
monthquery parameter. - Perform a Hard Refresh: Refresh the page while retaining the modified URL.
Expected Behavior
- Before the Fix: Slots before the selected date were not selectable.
- After the Fix: All slots, including those before the selected date, should now be selectable.
@sanchitttt is attempting to deploy a commit to the cal Team on Vercel.
A member of the Team first needs to authorize it.
Graphite Automations
"Add consumer team as reviewer" took an action on this PR • (12/10/24)
1 reviewer was added to this PR based on Keith Williams's automation.
"Add community label" took an action on this PR • (12/10/24)
1 label was added to this PR based on Keith Williams's automation.
Hey @sanchitttt , can you attach a loom of the fix ?
Hi @Praashh
Here is the link to the loom video: https://www.loom.com/share/780e28bf83644d44a5dc9969c6df6c7f
On the left it is the current prod app and on the right is local one with the changes.
Test scenario is same across both sides i.e. availability is set for Dec 13, Dec 20 & Dec 24 for one to book.
This PR is being marked as stale due to inactivity.
This PR is being marked as stale due to inactivity.