vaidikgarg-bit opened a new pull request, #864: URL: https://github.com/apache/fineract-backoffice-ui/pull/864
The add-family-member form opens its birth-date picker on the browser's month. When the operator's clock is in a later month than the tenant's business date, every day the picker shows is disabled and the days that can be picked are in an earlier month. `client-family-member-create.spec.ts` started failing on 1 November for this reason. #859 brought CI back by pinning that spec's clock inside October, but the form still behaves this way for operators. `ion-datetime` picks the month it opens on once, in `componentWillLoad`, by clamping today to `min` and `max`. `maxChanged()` recomputes the bound and leaves the month alone (`@ionic/core` 8.8.19, `components/datetime/datetime.js`). The form gets `max` from `PlatformDateService.resolveToday()`, which answers after the picker has loaded. Pickers with a value are not affected, because setting the value moves the calendar to it. The form now creates the picker only once `maxDateOfBirth()` has resolved. Its button becomes `app-deferred-datetime-button`: the page-level `pickersReady` flag is already true when the `@if` opens, so a plain `ion-datetime-button` would look for its picker before it exists (#548). Until the platform answers, the date-of-birth row shows only its label, and it grows when the button appears, usually within a second. If `resolveToday()` never emitted, the control would not render at all. Its error paths all emit, so only a hung request does that; before this change the picker rendered unbounded in that case. `app-date-field` gets the same treatment: it rebuilds its picker when `min` or `max` changes. No caller passes either yet, but a business-date bound would hit the same bug. A bound that changes while the modal is open replaces it without a dismiss, which the component comment notes. `client-family-member-create.spec.ts` now pins the browser to 2026-11-20, a month after the mocked business date, so it fails without the fix in any month. `client-family-date-of-birth.spec.ts` screenshots the enclosing `ion-item` instead of the button's parent, since that parent is now a `display: contents` host. The client, center and group action dialogs also take `max` from the business date asynchronously. They always hold a value and set `max` together with it, so they open on the right month and are unchanged. ### Testing - New unit tests for the form and for `app-date-field`; both fail on `main` and pass here. - `client-family-member-create.spec.ts` fails without the form change (no "Friday, October 16" cell on screen) and passes with it. - Full mocked Playwright project: 462 passed, 1 skipped. - `npm run lint`, `format:check`, `i18n:check`, `check:icons`, `check:a11y-names`, `typecheck:e2e`, `test:unit` (2825 tests) and `build` pass. - Not run: the backend Playwright project. `client-family-member-backend.spec.ts` selects `ion-datetime-button[datetime="family-dob-picker"]`, which the deferred button still stamps. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
