Skip to content

Commit

Permalink
fix(datepicker): fix date error
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaubree committed Dec 13, 2023
1 parent 4a6f07d commit 70bbeb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/datepicker/UDatepicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function isToday(date: number): boolean {
return today === d
}
function isSelectedDate(d: number) {
return date.value?.toDateString() === new Date(year.value, month.value, d).toDateString()
return date.value?.toDateString() === new Date(year.value, month.value, d)?.toDateString()
}
function onPreviousButtonClick() {
if (currentSelection.value === 'day') {
Expand Down

0 comments on commit 70bbeb7

Please sign in to comment.