Skip to content

feat(datetime): inputModeChanged; add enterInputMode/exitInputMode - #30677

Closed
vunizhona wants to merge 1 commit into
ionic-team:mainfrom
vunizhona:feat/datetime-picker-public-API-to-programmatically-enter-numeric-input-mode-30634
Closed

vunizhona wants to merge 1 commit into
ionic-team:mainfrom
vunizhona:feat/datetime-picker-public-API-to-programmatically-enter-numeric-input-mode-30634

Conversation

@vunizhona

Copy link
Copy Markdown
Contributor

Issue number: resolves #30634


What is the current behavior?

  • enterInputMode/exitInputMode is not available in the datetime picker
  • inputMode status updates are not available

What is the new behavior?

  • New event: inputModeChanged on ion-datetime with payload { active: boolean }.
  • New methods: enterInputMode(scope?: 'all'|'hour'|'minute', options?: { focus?: boolean }) and exitInputMode().
  • Restrict to time, date-time, time-date, and only when numeric columns exist; robust detection (class or [numeric-input]).
  • Re-emit only when applicable; attach/detach listener to avoid duplicates.
  • Fallback event emission in tests when picker methods aren’t available; deduped via internal state.
  • Dev-only warnings via Build.isDev.

Does this introduce a breaking change?

  • Yes
  • No

datetime: restrict enter/exit to time with numeric columns; re‑emit only when present; add robust detection + fallback (tests) with internal dedupe; gate warnings behind Build.isDev.
picker: dedupe ionInputModeChange, debounce exit inactive, toggle aria-hidden around focus.
tests: assert single active/inactive; no emit on repeated enter; none for unsupported presentations.
@vunizhona
vunizhona requested a review from a team as a code owner September 10, 2025 12:46
@vunizhona
vunizhona requested a review from gnbm September 10, 2025 12:46
@vercel

vercel Bot commented Sep 10, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
ionic-framework Ready Ready Preview Comment Sep 10, 2025 0:48am

@thetaPC

thetaPC commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Thanks for putting this together. We are closing this in favor of fixing ion-picker-column's setFocus(), which covers entering input mode from code once it works again. The details are in #30634.

If you would like to work on that fix, we would welcome a PR. setFocus() still focuses assistiveFocusable, which nothing has set since #30563, so it needs to focus scrollEl instead. The aria-valuetext update in the scroll callback reads the same field and needs the same change. Please include an e2e test that calls setFocus() on a numeric-input column and checks that typing a digit changes the value.

@thetaPC thetaPC closed this Oct 16, 2026

This branch was successfully deployed

1 active deployment
Preview — bbd55e9f Deployed Sep 10, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: angular @ionic/angular package package: core @ionic/core package package: vue @ionic/vue package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: picker-column setFocus() does not focus the column

2 participants