@progressive-development/pd-calendar 0.2.15 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/PdCalendar.js +3 -3
package/package.json
CHANGED
package/src/PdCalendar.js
CHANGED
|
@@ -125,7 +125,7 @@ export class PdCalendar extends LitElement {
|
|
|
125
125
|
return {
|
|
126
126
|
refDate: { type: Object },
|
|
127
127
|
selectableDates: { type: Boolean},
|
|
128
|
-
withYearPopup: { type:
|
|
128
|
+
withYearPopup: { type: Array},
|
|
129
129
|
showSelection: { type: Boolean},
|
|
130
130
|
hideWeekend: { type: Boolean, reflect: true },
|
|
131
131
|
prevMonthConstraint: { type: Number },
|
|
@@ -385,7 +385,7 @@ export class PdCalendar extends LitElement {
|
|
|
385
385
|
</div>
|
|
386
386
|
|
|
387
387
|
<div id="titleContentId" class="content-title">
|
|
388
|
-
${this._monthName} ${this.withYearPopup ? html`
|
|
388
|
+
${this._monthName} ${this.withYearPopup && this.withYearPopup.length > 0 ? html`
|
|
389
389
|
<span class="year-popup-link" @click="${this._openYearPopup}">${this._year}</span>
|
|
390
390
|
` : html`${this._year}`}
|
|
391
391
|
</div>
|
|
@@ -415,7 +415,7 @@ export class PdCalendar extends LitElement {
|
|
|
415
415
|
_openYearPopup() {
|
|
416
416
|
|
|
417
417
|
const popup = new PdYearPopup();
|
|
418
|
-
popup.yearSelection =
|
|
418
|
+
popup.yearSelection = this.withYearPopup;
|
|
419
419
|
this.shadowRoot.getElementById("titleContentId").appendChild(popup);
|
|
420
420
|
|
|
421
421
|
popup.addEventListener("abort-year-selection", () => {
|