Fixed #1942 - Calendar: the Year is incorrect for Multiple Months mode
parent
65ddfc4fcf
commit
54b16a1c84
|
@ -19,7 +19,7 @@
|
||||||
{{getMonthName(month.month)}}
|
{{getMonthName(month.month)}}
|
||||||
</button>
|
</button>
|
||||||
<button type="button" @click="switchToYearView" @keydown="onContainerButtonKeydown" v-if="currentView !== 'year'" class="p-datepicker-year p-link" :disabled="switchViewButtonDisabled">
|
<button type="button" @click="switchToYearView" @keydown="onContainerButtonKeydown" v-if="currentView !== 'year'" class="p-datepicker-year p-link" :disabled="switchViewButtonDisabled">
|
||||||
{{month.year}}
|
{{getYear(month)}}
|
||||||
</button>
|
</button>
|
||||||
<span class="p-datepicker-decade" v-if="currentView === 'year'">
|
<span class="p-datepicker-decade" v-if="currentView === 'year'">
|
||||||
<slot name="decade" :years="yearPickerValues">
|
<slot name="decade" :years="yearPickerValues">
|
||||||
|
@ -2215,6 +2215,9 @@ export default {
|
||||||
getMonthName(index) {
|
getMonthName(index) {
|
||||||
return this.$primevue.config.locale.monthNames[index];
|
return this.$primevue.config.locale.monthNames[index];
|
||||||
},
|
},
|
||||||
|
getYear(month) {
|
||||||
|
return this.currentView === 'month' ? this.currentYear : month.year;
|
||||||
|
},
|
||||||
onOverlayClick(event) {
|
onOverlayClick(event) {
|
||||||
if (!this.inline) {
|
if (!this.inline) {
|
||||||
OverlayEventBus.emit('overlay-click', {
|
OverlayEventBus.emit('overlay-click', {
|
||||||
|
|
Loading…
Reference in New Issue