@progressive-development/pd-calendar 0.0.14 → 0.0.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 +11 -0
package/package.json
CHANGED
package/src/PdCalendar.js
CHANGED
|
@@ -190,6 +190,17 @@ export class PdCalendar extends LitElement {
|
|
|
190
190
|
this._initFromDate(ref);
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
+
update(changedProperties) {
|
|
194
|
+
// check for month selection (set by remote server if no result available for the first call)
|
|
195
|
+
if (changedProperties.has("data") && this.data.monthSelection) {
|
|
196
|
+
const now = new Date(Date.now());
|
|
197
|
+
const startDateNextMonth = new Date(now.getFullYear(), this.data.monthSelection, 1);
|
|
198
|
+
this._currentMonthNavNr += 1;
|
|
199
|
+
this._initFromDate(startDateNextMonth);
|
|
200
|
+
}
|
|
201
|
+
super.update(changedProperties);
|
|
202
|
+
}
|
|
203
|
+
|
|
193
204
|
render() {
|
|
194
205
|
return html`
|
|
195
206
|
${this.renderCalendarByViewType()}
|