Closed stefounie95 closed 7 years ago
@stefounie95
I think you must have imported the wrong HTML file.
Let's try it again with the following code.
<link rel="import" href="bower_components/polymer/polymer.html">
<link rel="import" href="bower_components/app-datepicker/app-datepicker-dialog.html">
<dom-module id="my-el">
<template strip-whitespace>
<style>
:host {
display: block;
}
</style>
<app-datepicker-dialog id="dialog"></app-datepicker-dialog>
<button on-tap="openDialog">plain dialog</button>
</template>
<script>
class MyEl extends Polymer.Element {
static get is() { return 'my-el'; }
static get properties() {}
openDialog(){
this.dialog.open();
}
get dialog() { return this.shadowRoot.querySelector('#dialog'); }
}
window.customElements.define(MyEl.is, MyEl);
</script>
</dom-module>
With your solution, it works ! Thank you very much !
Just a thing to add on the dependancies : it needs the package "paper-button" on the bower_components to works, and the "web-animations-js" to have the animations
Description
Using Polymer 2, the
app-datepicker-dialog
element doesn't show when click on a button.Code example
Steps to reproduce
app-datepicker
element in the page.Browser used
Chromium