Skip to content

fix(react): pickup date range respects lead time (prep_time)#1393

Open
agupta17-godaddy wants to merge 1 commit into
godaddy:mainfrom
agupta17-godaddy:VNEXT-80686
Open

fix(react): pickup date range respects lead time (prep_time)#1393
agupta17-godaddy wants to merge 1 commit into
godaddy:mainfrom
agupta17-godaddy:VNEXT-80686

Conversation

@agupta17-godaddy

Copy link
Copy Markdown

Summary

The date picker in local pickup checkout now accounts for the store's leadTime (prep_time) when determining selectable dates.

Key Changes:

  • Start date = first available date after current_time + leadTime (previously today)
  • End date = start date + pickupWindowInDays (previously today + window)
  • Fixed double-zoning bug in findFirstAvailablePickupDate that caused incorrect day-of-week on non-UTC machines
  • Use formatTz for pickupDate form values to ensure store timezone is used

Files Changed:

  • packages/react/src/components/checkout/pickup/utils/generate-pickup-time-slots.ts
  • packages/react/src/components/checkout/pickup/local-pickup.tsx

Test Plan

  • All 118 tests pass (including previously failing LA timezone test)
  • Run: pnpm --filter @godaddy/react test

Closes #VNEXT-80686

Made with Cursor

The date picker now accounts for leadTime when computing selectable dates:
- Start date = first available date after current_time + leadTime
- End date = start date + pickupWindowInDays (advance window from first bookable date)
- Fixed double-zoning bug in findFirstAvailablePickupDate that caused
  incorrect day-of-week on non-UTC machines (returns raw date instead
  of pre-zoned date so generatePickupTimeSlots can zone it once)
- Use formatTz for pickupDate form values to ensure store timezone is used

Co-authored-by: Cursor <cursoragent@cursor.com>
@agupta17-godaddy agupta17-godaddy requested a review from a team as a code owner June 26, 2026 05:23
@changeset-bot

changeset-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5bed308

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

1 participant