@ptsecurity/mosaic 17.2.4 → 17.2.5
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/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-header.component.mjs +7 -4
- package/fesm2022/ptsecurity-mosaic-core.mjs +1 -1
- package/fesm2022/ptsecurity-mosaic-core.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-datepicker.mjs +6 -3
- package/fesm2022/ptsecurity-mosaic-datepicker.mjs.map +1 -1
- package/package.json +4 -4
@@ -166,7 +166,7 @@ class McCalendarHeader {
|
|
166
166
|
});
|
167
167
|
}
|
168
168
|
ngAfterContentInit() {
|
169
|
-
this.
|
169
|
+
this.updateSelectionOptions();
|
170
170
|
this.updateSelectedValues();
|
171
171
|
}
|
172
172
|
/** Handles when a new month is selected. */
|
@@ -233,10 +233,13 @@ class McCalendarHeader {
|
|
233
233
|
const maxYear = this.adapter.getYear(this.maxDate);
|
234
234
|
const maxMonth = this.adapter.getMonth(this.maxDate);
|
235
235
|
const currentYear = this.adapter.getYear(this._activeDate);
|
236
|
-
if (currentYear === minYear) {
|
236
|
+
if (currentYear === minYear && currentYear === maxYear) {
|
237
|
+
this.monthNames.forEach((month) => (month.disabled = month.value < minMonth || month.value > maxMonth));
|
238
|
+
}
|
239
|
+
else if (currentYear === minYear) {
|
237
240
|
this.monthNames.forEach((month) => (month.disabled = month.value < minMonth));
|
238
241
|
}
|
239
|
-
if (currentYear === maxYear) {
|
242
|
+
else if (currentYear === maxYear) {
|
240
243
|
this.monthNames.forEach((month) => (month.disabled = month.value > maxMonth));
|
241
244
|
}
|
242
245
|
}
|