Fixed #2810 - Calendar: showOtherMonths - does not match the description in the documentation

pull/2873/head
Tuğçe Küçükoğlu 2022-08-22 14:58:18 +03:00
parent 0fe7b7baad
commit 4b8b522cb9
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@
<div class="p-datepicker-group" v-for="(month,groupIndex) of months" :key="month.month + month.year"> <div class="p-datepicker-group" v-for="(month,groupIndex) of months" :key="month.month + month.year">
<div class="p-datepicker-header"> <div class="p-datepicker-header">
<slot name="header"></slot> <slot name="header"></slot>
<button class="p-datepicker-prev p-link" v-show="groupIndex === 0" @click="onPrevButtonClick" type="button" @keydown="onContainerButtonKeydown" v-ripple :disabled="disabled" :aria-label=" currentView === 'year' ? $primevue.config.locale.prevDecade: currentView === 'month' ? $primevue.config.locale.prevYear : $primevue.config.locale.prevMonth"> <button class="p-datepicker-prev p-link" v-show="showOtherMonths ? groupIndex === 0 : false" @click="onPrevButtonClick" type="button" @keydown="onContainerButtonKeydown" v-ripple :disabled="disabled" :aria-label=" currentView === 'year' ? $primevue.config.locale.prevDecade: currentView === 'month' ? $primevue.config.locale.prevYear : $primevue.config.locale.prevMonth">
<span class="p-datepicker-prev-icon pi pi-chevron-left"></span> <span class="p-datepicker-prev-icon pi pi-chevron-left"></span>
</button> </button>
<div class="p-datepicker-title"> <div class="p-datepicker-title">
@ -29,7 +29,7 @@
</slot> </slot>
</span> </span>
</div> </div>
<button class="p-datepicker-next p-link" v-show="numberOfMonths === 1 ? true : (groupIndex === numberOfMonths - 1)" <button class="p-datepicker-next p-link" v-show="showOtherMonths ? numberOfMonths === 1 ? true : (groupIndex === numberOfMonths - 1) : false"
@click="onNextButtonClick" type="button" @keydown="onContainerButtonKeydown" v-ripple :disabled="disabled" :aria-label=" currentView === 'year' ? $primevue.config.locale.nextDecade : currentView === 'month' ? $primevue.config.locale.nextYear : $primevue.config.locale.nextMonth"> @click="onNextButtonClick" type="button" @keydown="onContainerButtonKeydown" v-ripple :disabled="disabled" :aria-label=" currentView === 'year' ? $primevue.config.locale.nextDecade : currentView === 'month' ? $primevue.config.locale.nextYear : $primevue.config.locale.nextMonth">
<span class="p-datepicker-next-icon pi pi-chevron-right"></span> <span class="p-datepicker-next-icon pi pi-chevron-right"></span>
</button> </button>

View File

@ -14,7 +14,7 @@
<div class="p-fluid grid formgrid"> <div class="p-fluid grid formgrid">
<div class="field col-12 md:col-4"> <div class="field col-12 md:col-4">
<label for="basic">Basic</label> <label for="basic">Basic</label>
<Calendar id="basic" v-model="date1" autocomplete="off" /> <Calendar id="basic" v-model="date1" :showOtherMonths="false" autocomplete="off" />
</div> </div>
<div class="field col-12 md:col-4"> <div class="field col-12 md:col-4">
<label for="dateformat">DateFormat</label> <label for="dateformat">DateFormat</label>