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') {
this.onDateSelect(event, { year: this.currentYear, month: index, day: 1, selectable: true });
} else {
this.currentMonth = index + 3;
this.currentMonth = index + 4;
this.currentView = 'date';
this.$emit('month-change', { month: this.currentMonth , year: this.currentYear });
}
@@ -2659,7 +2659,7 @@ export default {
getMonthName(index) {
const date = new Date(this.currentYear, index);
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) {
const year = this.currentView === 'month' ? this.currentYear : month.year