Skip to content

Commit

Permalink
fix: Correct highlight-disabled-dates check
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasenkoo committed Oct 14, 2023
1 parent 8b7d434 commit 4e9cab3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/VueDatePicker/composables/calendar-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,11 @@ export const useCalendarClass = (modelValue: WritableComputedRef<InternalModuleV
// If enabled, checks the days that are also highlighted to not be marked as disabled
const disableHighlight = (day: ICalendarDay) => {
const disabled = isDisabled(day.value);
return !(
return (
disabled &&
(typeof defaultedHighlight.value === 'function'
? defaultedHighlight.value(day.value, disabled)
: defaultedHighlight.value.options.highlightDisabled)
? !defaultedHighlight.value(day.value, disabled)
: !defaultedHighlight.value.options.highlightDisabled)
);
};

Expand Down

0 comments on commit 4e9cab3

Please sign in to comment.