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