I'm getting an error when try to use the easepick with the Stencil framework. https://easepick.com/guide/
Error
peError: (t || this.calendars[0]).clone is not a function
at n.renderAll (date-picker.entry.js:3:1)
at new n (date-picker.entry.js:3:1)
at OsdiDatePicker.componentDidLoad (date-picker.entry.js:15:1)
at safeCall (index-1c078499.js:955:1)
at postUpdateComponent (index-1c078499.js:915:1)
at postUpdate (index-1c078499.js:863:1)
at _callee$ (index-1c078499.js:865:1)
at tryCatch (index-1c078499.js:2:1)
at Generator.<anonymous> (index-1c078499.js:2:1)
at Generator.next (index-1c078499.js:2:1) undefined
The Stencil code example:
import { Component, h } from "@stencil/core";
import { easepick } from "@easepick/bundle";
@Component({
tag: "my-component",
styleUrl: "my-component.css",
shadow: true,
})
export class MyComponent {
datepicker: HTMLInputElement;
componentDidLoad() {
const pickerNew = new easepick.create({
element: this.datepicker,
css: [
"https://cdn.jsdelivr.net/npm/@easepick/bundle@1.2.1/dist/index.css",
],
});
console.log("DEBUG pickerNew:", pickerNew);
}
render() {
return (
<div class="date-picker-container">
<input id="datepicker" ref={(el) => (this.datepicker = el)} />
</div>
);
}
}
I don't know if it's related only to Stencil because Stencil is using ShadowRoot and the easepick
also uses ShadowRoott
I appreciate any support.