fix dateOfBirth wrong value

This commit is contained in:
mohadese-nm
2024-07-24 19:03:24 +04:30
parent d25d744d7f
commit 03d14fe36c
+2 -2
View File
@@ -1659,7 +1659,7 @@ export default {
if (this.view === 'month') { if (this.view === 'month') {
this.onDateSelect(event, { year: this.currentYear, month: index, day: 1, selectable: true }); this.onDateSelect(event, { year: this.currentYear, month: index, day: 1, selectable: true });
} else { } else {
this.currentMonth = index + 3; this.currentMonth = index + 4;
this.currentView = 'date'; this.currentView = 'date';
this.$emit('month-change', { month: this.currentMonth , year: this.currentYear }); this.$emit('month-change', { month: this.currentMonth , year: this.currentYear });
} }
@@ -2659,7 +2659,7 @@ export default {
getMonthName(index) { getMonthName(index) {
const date = new Date(this.currentYear, index); const date = new Date(this.currentYear, index);
const month = parseInt(date.toLocaleDateString('fa-IR-u-nu-latn',{month:'numeric'})) const month = parseInt(date.toLocaleDateString('fa-IR-u-nu-latn',{month:'numeric'}))
return this.$primevue.config.locale.monthNames[month - 1]; return this.$primevue.config.locale.monthNames[month - 2];
}, },
getYear(month) { getYear(month) {
const year = this.currentView === 'month' ? this.currentYear : month.year const year = this.currentView === 'month' ? this.currentYear : month.year