fix(frontend): allow future manual activity dates on web (#624)#733
fix(frontend): allow future manual activity dates on web (#624)#733AtomicTrxn wants to merge 5 commits intoafadil:mainfrom
Conversation
afadil
left a comment
There was a problem hiding this comment.
The DatePicker wrapper component is only used by activity forms — other date inputs (quote history, alternative assets, contribution limits, etc.) use DatePickerInput from @wealthfolio/ui directly.
Since every single caller of DatePicker now passes allowFutureDates={true}, the default is wrong. When 100% of callers override a default, just flip the default.
Suggested fix: Change the default in date-picker.tsx from allowFutureDates = false to true (or remove the prop entirely since DatePicker is activity-only). This turns a 13-file PR into a ~2-file change (date-picker + the Rust test).
The Rust backend test (test_get_latest_holdings_snapshot_excludes_future_dated_activity) is a good addition — keep that.
Description
Root cause:
DatePickerwith its defaultallowFutureDates={false}, which clampsactivityDateto today.Fix summary:
allowFutureDates={true}foractivityDate.DatePickerandBuyForm.Validation:
pnpm --filter frontend test -- buy-formpnpm --filter frontend test -- date-pickercargo test -p wealthfolio-core test_get_latest_holdings_snapshot_excludes_future_dated_activitypnpm --filter frontend lint(passes with existing repo warning baseline)pnpm --filter frontend type-checkis still failing on pre-existing unrelated issues inapps/frontend/src/addons/type-bridge.tsandapps/frontend/src/pages/holdings/components/alternative-holdings-table.tsxFixes #624
Checklist
Contributor License Agreement.
By submitting this PR, I agree to the
CLA.