Skip to content

Commit

Permalink
Fixed #876 - Calendar fails with prop monthNavigator = true
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Jan 27, 2021
1 parent 165dd2b commit 8609492
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/calendar/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div class="p-datepicker-title">
<span class="p-datepicker-month" v-if="!monthNavigator && (view !== 'month')">{{getMonthName(month.month)}}</span>
<select class="p-datepicker-month" v-if="monthNavigator && (view !== 'month') && numberOfMonths === 1" @change="onMonthDropdownChange($event.target.value)">
<option :value="index" v-for="(monthName, index) of locale.monthNames" :key="monthName" :selected="index === month.month">{{monthName}}</option>
<option :value="index" v-for="(monthName, index) of monthNames" :key="monthName" :selected="index === month.month">{{monthName}}</option>
</select>
<span class="p-datepicker-year" v-if="!yearNavigator">{{view === 'month' ? currentYear : month.year}}</span>
<select class="p-datepicker-year" v-if="yearNavigator && numberOfMonths === 1" @change="onYearDropdownChange($event.target.value)">
Expand Down Expand Up @@ -2192,7 +2192,7 @@ export default {
weekHeaderLabel() {
return this.$primevue.config.locale.weekHeader;
},
monthsNames() {
monthNames() {
return this.$primevue.config.locale.monthNames;
}
},
Expand Down

0 comments on commit 8609492

Please sign in to comment.