Skip to content

fix(datetime): re-process value in componentDidLoad if present - #31593

Open
rudrakshagarwal4200-ai wants to merge 1 commit into
ionic-team:mainfrom
rudrakshagarwal4200-ai:rudrakshagarwal4200-ai-patch-4
Open

rudrakshagarwal4200-ai wants to merge 1 commit into
ionic-team:mainfrom
rudrakshagarwal4200-ai:rudrakshagarwal4200-ai-patch-4

Conversation

@rudrakshagarwal4200-ai

Copy link
Copy Markdown

Summary

Fixes #31565.

With standalone components under Angular / zone.js, NgModel writes value in a resolved-promise microtask after the element is connected. Because the Stencil runtime does not set the watch-ready flag until the native customElements.whenDefined() promise resolves, @Watch('value') is missed for values assigned during that microtask window. Consequently, workingParts defaults to current time, and the wheels open on the current time rather than the bound value.

Fix

In componentDidLoad(), check if (this.hasValue()) { this.processValue(this.value); }. This ensures any value set before load is properly evaluated, updating workingParts and wheel indices to the bound value.

Added a check to re-process value if assigned before componentDidLoad.
@vercel

vercel Bot commented Oct 17, 2026

Copy link
Copy Markdown

@rudrakshagarwal4200-ai is attempting to deploy a commit to the Ionic Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the package: core @ionic/core package label Oct 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: datetime ignores a value set right after it is attached when zone.js is loaded, and shows the current time

1 participant