Merge pull request #4114 from melloware/PV4113
Fix #4113: Calendar showMonthAfterYear locale optionpull/4391/head
commit
81d971ef56
|
@ -86,32 +86,62 @@
|
|||
</slot>
|
||||
</button>
|
||||
<div :class="cx('title')" v-bind="ptm('title')">
|
||||
<button
|
||||
v-if="currentView === 'date'"
|
||||
type="button"
|
||||
@click="switchToMonthView"
|
||||
@keydown="onContainerButtonKeydown"
|
||||
:class="cx('monthTitle')"
|
||||
:disabled="switchViewButtonDisabled"
|
||||
:aria-label="$primevue.config.locale.chooseMonth"
|
||||
v-bind="ptm('monthTitle')"
|
||||
data-pc-group-section="view"
|
||||
>
|
||||
{{ getMonthName(month.month) }}
|
||||
</button>
|
||||
<button
|
||||
v-if="currentView !== 'year'"
|
||||
type="button"
|
||||
@click="switchToYearView"
|
||||
@keydown="onContainerButtonKeydown"
|
||||
:class="cx('yearTitle')"
|
||||
:disabled="switchViewButtonDisabled"
|
||||
:aria-label="$primevue.config.locale.chooseYear"
|
||||
v-bind="ptm('yearTitle')"
|
||||
data-pc-group-section="view"
|
||||
>
|
||||
{{ getYear(month) }}
|
||||
</button>
|
||||
<span v-if="$primevue.config.locale.showMonthAfterYear">
|
||||
<button
|
||||
v-if="currentView !== 'year'"
|
||||
type="button"
|
||||
@click="switchToYearView"
|
||||
@keydown="onContainerButtonKeydown"
|
||||
:class="cx('yearTitle')"
|
||||
:disabled="switchViewButtonDisabled"
|
||||
:aria-label="$primevue.config.locale.chooseYear"
|
||||
v-bind="ptm('yearTitle')"
|
||||
data-pc-group-section="view"
|
||||
>
|
||||
{{ getYear(month) }}
|
||||
</button>
|
||||
<button
|
||||
v-if="currentView === 'date'"
|
||||
type="button"
|
||||
@click="switchToMonthView"
|
||||
@keydown="onContainerButtonKeydown"
|
||||
:class="cx('monthTitle')"
|
||||
:disabled="switchViewButtonDisabled"
|
||||
:aria-label="$primevue.config.locale.chooseMonth"
|
||||
v-bind="ptm('monthTitle')"
|
||||
data-pc-group-section="view"
|
||||
>
|
||||
{{ getMonthName(month.month) }}
|
||||
</button>
|
||||
</span>
|
||||
<span v-else>
|
||||
<button
|
||||
v-if="currentView === 'date'"
|
||||
type="button"
|
||||
@click="switchToMonthView"
|
||||
@keydown="onContainerButtonKeydown"
|
||||
:class="cx('monthTitle')"
|
||||
:disabled="switchViewButtonDisabled"
|
||||
:aria-label="$primevue.config.locale.chooseMonth"
|
||||
v-bind="ptm('monthTitle')"
|
||||
data-pc-group-section="view"
|
||||
>
|
||||
{{ getMonthName(month.month) }}
|
||||
</button>
|
||||
<button
|
||||
v-if="currentView !== 'year'"
|
||||
type="button"
|
||||
@click="switchToYearView"
|
||||
@keydown="onContainerButtonKeydown"
|
||||
:class="cx('yearTitle')"
|
||||
:disabled="switchViewButtonDisabled"
|
||||
:aria-label="$primevue.config.locale.chooseYear"
|
||||
v-bind="ptm('yearTitle')"
|
||||
data-pc-group-section="view"
|
||||
>
|
||||
{{ getYear(month) }}
|
||||
</button>
|
||||
</span>
|
||||
<span v-if="currentView === 'year'" :class="cx('decadeTitle')" v-bind="ptm('decadeTitle')">
|
||||
<slot name="decade" :years="yearPickerValues"> {{ yearPickerValues[0].value }} - {{ yearPickerValues[yearPickerValues.length - 1].value }} </slot>
|
||||
</span>
|
||||
|
|
|
@ -326,6 +326,7 @@ export interface PrimeVueLocaleOptions {
|
|||
today?: string;
|
||||
weekHeader?: string;
|
||||
firstDayOfWeek?: number;
|
||||
showMonthAfterYear?: boolean;
|
||||
dateFormat?: string;
|
||||
weak?: string;
|
||||
medium?: string;
|
||||
|
|
|
@ -59,6 +59,7 @@ export const defaultOptions = {
|
|||
today: 'Today',
|
||||
weekHeader: 'Wk',
|
||||
firstDayOfWeek: 0,
|
||||
showMonthAfterYear: false,
|
||||
dateFormat: 'mm/dd/yy',
|
||||
weak: 'Weak',
|
||||
medium: 'Medium',
|
||||
|
|
Loading…
Reference in New Issue