Skip to content

Commit 54dbd9f

Browse files
fix(datetime): multiple month selected and flakiness display
1 parent 34effe8 commit 54dbd9f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

core/src/components/datetime/datetime.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,9 @@ export class Datetime implements ComponentInterface {
10861086

10871087
connectedCallback() {
10881088
this.clearFocusVisible = startFocusVisible(this.el).destroy;
1089+
this.loadTimeout = setTimeout(() => {
1090+
this.ensureReadyIfVisible();
1091+
}, 100);
10891092
}
10901093

10911094
disconnectedCallback() {
@@ -1095,6 +1098,7 @@ export class Datetime implements ComponentInterface {
10951098
}
10961099
if (this.loadTimeout) {
10971100
clearTimeout(this.loadTimeout);
1101+
this.loadTimeout = undefined;
10981102
}
10991103
}
11001104

core/src/components/picker-column/picker-column.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export class PickerColumn implements ComponentInterface {
122122
* Because this initial call to scrollActiveItemIntoView has to fire before
123123
* the scroll listener is set up, we need to manage the active class manually.
124124
*/
125-
const oldActive = getElementRoot(el).querySelector<HTMLIonPickerColumnOptionElement>(
125+
const oldActive = el.querySelector<HTMLIonPickerColumnOptionElement>(
126126
`.${PICKER_ITEM_ACTIVE_CLASS}`
127127
);
128128
if (oldActive) {

0 commit comments

Comments
 (0)