Skip to content

Commit

Permalink
fix(DatetimePicker): get wrong month when the day is at the boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
SexySix authored and Pilotager committed Mar 31, 2024
1 parent 81fc719 commit c2336a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/src/datetime-picker/use-datetime-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export function useDatetimePicker(options: UseDatetimePicker = {}) {
}
break
case "month":
date.setDate(1)
if (_.size(datetimeValue) > index) {
date.setMonth(_.toNumber(datetimeValue[index]) - 1)
}
Expand Down

0 comments on commit c2336a6

Please sign in to comment.