Skip to content

Commit

Permalink
fix(month): wrong format
Browse files Browse the repository at this point in the history
  • Loading branch information
rbalet committed Jan 24, 2025
1 parent 18f0ab7 commit 03acad6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export class NgxMatBirthdayInputComponent
.subscribe((value) => {
// @ToDo: Wont work with multiple datePicker - component instantiation
this.controls.day?.patchValue(value.getDate().toString(), { emitEvent: false })
this.controls.month?.patchValue(value.getMonth().toString(), { emitEvent: false })
this.controls.month?.patchValue((value.getMonth() + 1).toString(), { emitEvent: false })
this.controls.year?.patchValue(value.getFullYear().toString(), { emitEvent: false })
})

Expand Down Expand Up @@ -342,7 +342,7 @@ export class NgxMatBirthdayInputComponent
minute = tempBDay.getMinutes()
hour = tempBDay.getHours()
day = tempBDay.getDate().toString()
month = tempBDay.getMonth().toString()
month = (tempBDay.getMonth() + 1).toString()
year = tempBDay.getFullYear().toString()
}

Expand Down

0 comments on commit 03acad6

Please sign in to comment.