Skip to content

Commit 9d40423

Browse files
author
Bedram Tamang
committed
refactor: refactor
1 parent 9684363 commit 9d40423

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/calendar/Calendar.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function Calendar(originalProps: CalendarProps) {
4242
defaultValue: startOfDay(new Date()),
4343
type: 'date' as PickerType,
4444
disabledDate: () => false,
45-
holidayClickable: () => false,
45+
holidayClickable: false,
4646
holidayDate: () => false,
4747
getClasses: () => [],
4848
titleFormat: 'YYYY-MM-DD',
@@ -97,10 +97,7 @@ function Calendar(originalProps: CalendarProps) {
9797
if (isDisabled(date)) {
9898
return false;
9999
}
100-
if (!props.holidayClickable && isHoliday(date)) {
101-
return false;
102-
}
103-
return true;
100+
return !(!props.holidayClickable && isHoliday(date));
104101
};
105102

106103
const emitDate = (date: Date, type: string) => {

0 commit comments

Comments
 (0)