Skip to content

fix(SDK-1275): match legacy's date bounds for off-cycle pay periods - #2702

Open
krisxcrash wants to merge 3 commits into
mainfrom
kw/fix/sdk-1275-off-cycle-date-bounds-parity
Open

fix(SDK-1275): match legacy's date bounds for off-cycle pay periods#2702
krisxcrash wants to merge 3 commits into
mainfrom
kw/fix/sdk-1275-off-cycle-date-bounds-parity

Conversation

@krisxcrash

Copy link
Copy Markdown
Contributor

Summary

Stacked on #2701 -- touches the same lines in OffCyclePayPeriodDateFormPresentation.tsx, please land that one first. This diff will narrow to just this change once it does.

  • Legacy allows a rolling 1-year-past to 1-year-future window on start date, end date, and payment date, identically for Bonus and Correction (app/views/off_cycle_payrolls/_pay_period.erb in gws-flows; Records::Payroll's GENERAL_OFF_CYCLE_REASONS comment: "allow an arbitrary check date")
  • The SDK instead blocked any future start date, but only for Correction payrolls, with no legacy counterpart
  • Removes that rule and wires the real ±1-year bound onto all three date pickers instead

Test plan

  • Added a hook-level test for the new maxDate/minPayPeriodDate computation
  • Added a schema-level test confirming a future start date now validates successfully

krisxcrash and others added 3 commits September 3, 2026 15:23
Only the check-only checkbox had description text; the Payment date
field itself had none. Legacy shows "Enter the date you'd like your
employees to receive payment." underneath it. Add the same via the
existing description prop, matching checkOnlyDescription's pattern.
Legacy allows a rolling 1-year-past to 1-year-future window on start
date, end date, and payment date, identically for Bonus and Correction
(app/views/off_cycle_payrolls/_pay_period.erb; Records::Payroll's
GENERAL_OFF_CYCLE_REASONS comment: "allow an arbitrary check date").
The SDK instead blocked any future start date, but only for Correction,
with no legacy counterpart. Drop that rule and wire the real ±1-year
bound onto all three date pickers instead.
@krisxcrash
krisxcrash marked this pull request as ready for review September 3, 2026 23:19
@krisxcrash
krisxcrash requested a review from a team as a code owner September 3, 2026 23:19
Base automatically changed from kw/fix/sdk-1273-payment-date-helper-text to main September 4, 2026 22:36
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.

2 participants