Fixed #1924 - Calendar: the Year is incorrect for Multiple Months mode

pull/1934/head
Yiğit FINDIKLI 2021-12-24 15:56:55 +03:00
parent 5dc11db0c3
commit 08f416207f
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<span ref="container" :class="containerClass" :style="style"> <span ref="container" :class="containerClass" :style="style">
<input :ref="inputRef" v-if="!inline" type="text" :class="['p-inputtext p-component', inputClass]" :style="inputStyle" @input="onInput" v-bind="$attrs" <input :ref="inputRef" v-if="!inline" type="text" :class="['p-inputtext p-component', inputClass]" :style="inputStyle" @input="onInput" v-bind="$attrs"
@focus="onFocus" @blur="onBlur" @keydown="onKeyDown" :readonly="!manualInput" inputmode="none"> @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" :readonly="!manualInput" inputmode="none">
<CalendarButton v-if="showIcon" :icon="icon" tabindex="-1" class="p-datepicker-trigger" :disabled="$attrs.disabled" @click="onButtonClick" type="button" :aria-label="inputFieldValue"/> <CalendarButton v-if="showIcon" :icon="icon" tabindex="-1" class="p-datepicker-trigger" :disabled="$attrs.disabled" @click="onButtonClick" type="button" :aria-label="inputFieldValue"/>
<Teleport :to="appendTarget" :disabled="appendDisabled"> <Teleport :to="appendTarget" :disabled="appendDisabled">
@ -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">
{{currentYear}} {{month.year}}
</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">