Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions packages/base/src/UI5Element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1354,22 +1354,22 @@ abstract class UI5Element extends HTMLElement {
this.i18nBundleStorage[bundleName] = i18nBundles[index];
});
this.asyncFinished = true;

// Register the custom element only after CLDR and i18n data is loaded
const tag = this.getMetadata().getTag();
const definedLocally = isTagRegistered(tag);
const definedGlobally = customElements.get(tag);

if (definedGlobally && !definedLocally) {
recordTagRegistrationFailure(tag);
} else if (!definedGlobally) {
this._generateAccessors();
registerTag(tag);
customElements.define(tag, this as unknown as CustomElementConstructor);
}
};
this.definePromise = defineSequence();

const tag = this.getMetadata().getTag();

const definedLocally = isTagRegistered(tag);
const definedGlobally = customElements.get(tag);

if (definedGlobally && !definedLocally) {
recordTagRegistrationFailure(tag);
} else if (!definedGlobally) {
this._generateAccessors();
registerTag(tag);
customElements.define(tag, this as unknown as CustomElementConstructor);
}

return this;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/main/test/pages/DatePicker.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h3>format-pattern - 'short'</h3>
<ui5-date-picker id='dp6' format-pattern='short'></ui5-date-picker>

<h3>format-pattern - 'long'</h3>
<ui5-date-picker id='dp7' format-pattern='long'></ui5-date-picker>
<ui5-date-picker id='dp7' show-clear-icon format-pattern='long'></ui5-date-picker>

<h3>format-pattern - 'QQQ yyyy, MMM dd'</h3>
<ui5-date-picker id='dp8' format-pattern='QQQ yyyy, MMM dd'></ui5-date-picker>
Expand Down Expand Up @@ -179,7 +179,7 @@ <h3>DatePicker with format `yyyy` should open picker on years</h3>
<ui5-title>Form validation</ui5-title>
<form id="formValidation">
<ui5-message-strip id="formValidationMessage" hidden></ui5-message-strip>
<ui5-date-picker min-date="6/1/2020" max-date="5/1/2021" format-pattern="dd/MM/yyyy" required id="formDatepicker"></ui5-date-picker>
<ui5-date-picker min-date="6/1/2020" max-date="5/1/2021" value="11/11/2020" format-pattern="dd/MM/yyyy" required id="formDatepicker"></ui5-date-picker>
<br><br>
<ui5-button id="btnCheckFormValidity">Check Validity</ui5-button>
</form>
Expand Down
Loading