bug: `<ion-datetime>` inside a modal ignores programmatic inputs
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- angular, typescript
- 領域
- frontend
調査の方向性
リンクされた StackBlitz の再現コードと、ModalController を通じて開かれる DatetimePickerModal から始めます。動的な dayValues バインディングとハードコードされた属性を、ion-content および @defer のバリエーションも含めて比較し、その後 modal と ion-datetime の統合を追跡します。ModalController を通じて datetime を開いたときに、プログラムによる入力が一貫して機能すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
When a <ion-datetime> element is used inside a <ion-modal> element. The <ion-datetime> element ignores its inputs when the <ion-modal> was opened using the ModalController
Expected Behavior
The <ion-datetime> element respects the inputs regardless of the way to display it.
Steps to Reproduce
- Create a component named
DatetimePickerModalthat uses<ion-datetime> - Create a property in the component for an
<ion-datetime>option, likedayValues = "1,10,20" - Add an input to
<ion-datetime>that uses the property:[dayValues]="dayValues" - Add code to open the modal:
this.controller.create({component: DatetimePickerModal}).then((modal) => modal.present()); - Open the modal
- See that the
dayValuesinput had no effect.
Code Reproduction URL
https://stackblitz.com/edit/kawiphog
Ionic Info
Ionic:
Ionic CLI : 7.2.1 (C:\Users\<USER>\scoop\persist\nvm\nodejs\v22.20.0\node_modules\@ionic\cli)
Ionic Framework : @ionic/angular 8.7.17 (C:\Users\<USER>\Projects\<PROJECT>\node_modules\@ionic\angular)
@angular-devkit/build-angular : 21.0.5 (C:\Users\<USER>\Projects\<PROJECT>\node_modules\@angular-devkit\build-angular)
@angular-devkit/schematics : 21.0.5 (C:\Users\<USER>\Projects\<PROJECT>\node_modules\@angular-devkit\schematics)
@angular/cli : 21.0.5 (C:\Users\<USER>\Projects\<PROJECT>\node_modules\@angular\cli)
@ionic/angular-toolkit : 12.3.0 (C:\Users\<USER>\Projects\<PROJECT>\node_modules\@ionic\angular-toolkit)
Capacitor:
Capacitor CLI : 8.0.2
@capacitor/android : 8.0.2 (C:\Users\<USER>\Projects\<PROJECT>\node_modules\@capacitor\android)
@capacitor/core : 8.0.2 (C:\Users\<USER>\Projects\<PROJECT>\node_modules\@capacitor\core)
@capacitor/ios : 8.0.2 (C:\Users\<USER>\Projects\<PROJECT>\node_modules\@capacitor\ios)
Utility:
cordova-res : not installed globally
native-run : 2.0.3
System:
NodeJS : v22.20.0 (C:\Users\<USER>\scoop\apps\nvm\current\nodejs\nodejs\node.exe)
npm : 11.10.0
OS : Windows 10
Additional Information
Related to https://github.com/ionic-team/ionic-framework/issues/30504
Wrapping the element in @defer { ... } seems to work in simple cases, but that workaround does not work in a complex application.
Downgrading @stencil/core to 4.1.0 is no longer an option because Ionic uses a render function that is not available in that version
✘ [ERROR] No matching export in "node_modules/@ionic/core/node_modules/@stencil/core/internal/client/index.js" for import "render"
node_modules/@ionic/core/components/index.js:4:23:
4 │ export { getAssetPath, render, setAssetPath, setNonce, setPlatformO...
╵ ~~~~~~
For some reason, hardcoding the input value like dayValues="1,10,20" does work correctly.
This works:
<ion-datetime
dayValues="1,10,20"
/>
This does not:
<ion-datetime
[dayValues]="dayValues"
/>
dayValues = "1,10,20";
For unknown reasons, wrapping the <ion-datetime> element inside <ion-content> also helps with the issue, again only in simple scenarios.
This works
<ion-content>
<ion-datetime
[dayValues]="dayValues"
/>
</ion-content>
This does not:
<ion-datetime
[dayValues]="dayValues"
/>
- 主要言語
- TypeScript
- スター
- 52.8k
- フォーク
- 13.3k
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 86
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ionic-team/ionic-framework のほかの issue
-
bug: input-otp, backspace in an empty box only moves focus instead of clearing the previous box対応中かも @sarankumar1325 が 23 日前に担当しました。 オープンpackage: core type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
ionic-team/ionic-framework#31639 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: vue swipe cancellation throws when the previous page is missing対応中かも @dandoingdev が 46 日前に担当しました。 オープンpackage: vue type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ionic-team/ionic-framework#31514 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: ion-searchbar input is always labelled "search text"; aria-label on the host is not forwarded対応中かも @HappyKnuckles が 41 日前に担当しました。 オープンa11y package: core type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
ionic-team/ionic-framework#31492 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: IonTabs throws when a Fragment contains one IonRouterOutlet対応中かも @Benziza が 82 日前に担当しました。 オープンpackage: react type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ionic-team/ionic-framework#31410 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: angular swipe-back gesture crashes in StackController.startBackTransition when the stack is popped before the gesture is captured対応中かも @officialasishkumar が 9 日前に担当しました。 オープンpackage: angular type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
ionic-team/ionic-framework#31291 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
ionic-team/ionic-framework の issue をすべて見る
似ている issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
lingdojo/kana-dojo#34223 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
bug status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
mastra-ai/mastra#30587 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:web p2 product:business triage:active type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
cuadrao-ai/argus#2228 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
embedpdf/embed-pdf-viewer#1098 ·
メンテナーはふだん 1 日以内に返信
-
.Needs Triage .Team/Metabot Priority:P3 Type:Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
metabase/metabase#87252 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信