From 21d1cecc8e57c98a313214be24f400cd4013b884 Mon Sep 17 00:00:00 2001 From: Ayemitibo Abiodun Date: Mon, 5 Jul 2021 10:32:41 +0100 Subject: [PATCH] chore : fixed month abbreviation on month only picker --- src/components/Datepicker.vue | 1 + src/components/PickerMonth.vue | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Datepicker.vue b/src/components/Datepicker.vue index 67055bef..1c31b4b1 100644 --- a/src/components/Datepicker.vue +++ b/src/components/Datepicker.vue @@ -63,6 +63,7 @@ :showMonthView="showMonthView" :allowedToShowView="allowedToShowView" :disabledDates="disabledDates" + :fullMonthName="fullMonthName" :calendarClass="calendarClass" :calendarStyle="calendarStyle" :translation="translation" diff --git a/src/components/PickerMonth.vue b/src/components/PickerMonth.vue index a1bd64d4..2d80025e 100644 --- a/src/components/PickerMonth.vue +++ b/src/components/PickerMonth.vue @@ -29,6 +29,7 @@ export default { pageTimestamp: Number, disabledDates: Object, calendarClass: [String, Object, Array], + fullMonthName: { type: Boolean, default: () => true }, calendarStyle: Object, translation: Object, isRtl: Boolean, @@ -51,7 +52,7 @@ export default { : new Date(d.getFullYear(), 0, d.getDate(), d.getHours(), d.getMinutes()) for (let i = 0; i < 12; i++) { months.push({ - month: this.utils.getMonthName(i, this.translation.months), + month: this.fullMonthName ? this.utils.getMonthName(i, this.translation.months) : this.utils.getMonthNameAbbr(i, this.translation.monthsAbbr), timestamp: dObj.getTime(), isSelected: this.isSelectedMonth(dObj), isDisabled: this.isDisabledMonth(dObj)